[{"data":1,"prerenderedAt":898},["ShallowReactive",2],{"navigation":3,"\u002Fsync-api\u002Fapi-reference\u002Fpython":99,"\u002Fsync-api\u002Fapi-reference\u002Fpython-surround":897},[4,16,52,71,91],{"title":5,"path":6,"stem":7,"children":8,"icon":15},"Getting Started","\u002Fgetting-started","1.getting-started\u002F1.index",[9,11],{"title":10,"path":6,"stem":7},"Introduction",{"title":12,"path":13,"stem":14},"Authentication","\u002Fgetting-started\u002Fauthentication","1.getting-started\u002F2.authentication","i-lucide-rocket",{"title":17,"path":18,"stem":19,"children":20,"icon":51},"GraphQL API","\u002Fgraphql-api","2.graphql-api\u002F1.index",[21,23,27,31,35,39,43,47],{"title":22,"path":18,"stem":19},"API Overview",{"title":24,"path":25,"stem":26},"Querying Patterns","\u002Fgraphql-api\u002Fquerying","2.graphql-api\u002F2.querying",{"title":28,"path":29,"stem":30},"Mutation Patterns","\u002Fgraphql-api\u002Fmutations","2.graphql-api\u002F3.mutations",{"title":32,"path":33,"stem":34},"List SaaS Applications","\u002Fgraphql-api\u002Fguides\u002Flist-applications","2.graphql-api\u002F4.guides\u002F1.list-applications",{"title":36,"path":37,"stem":38},"Find Unused Licenses","\u002Fgraphql-api\u002Fguides\u002Ffind-unused-licenses","2.graphql-api\u002F4.guides\u002F2.find-unused-licenses",{"title":40,"path":41,"stem":42},"Retrieve Upcoming Renewals","\u002Fgraphql-api\u002Fguides\u002Fupcoming-renewals","2.graphql-api\u002F4.guides\u002F3.upcoming-renewals",{"title":44,"path":45,"stem":46},"Handle GraphQL Errors","\u002Fgraphql-api\u002Fguides\u002Fhandle-errors","2.graphql-api\u002F4.guides\u002F4.handle-errors",{"title":48,"path":49,"icon":50},"API Reference","\u002Fgql-schema-reference","i-lucide-file-code","i-lucide-braces",{"title":53,"path":54,"stem":55,"children":56,"icon":70},"Sync API","\u002Fsync-api","3.sync-api\u002F1.index",[57,59,63,67],{"title":58,"path":54,"stem":55},"Viio Sync API",{"title":60,"path":61,"stem":62},"Quickstart","\u002Fsync-api\u002Fquickstart","3.sync-api\u002F2.quickstart",{"title":64,"path":65,"icon":66},"Examples","\u002Fsync-api\u002Faws-lambda-python","i-lucide-code-xml",{"title":68,"path":69,"icon":50},"SDK Reference","\u002Fsync-api\u002Fapi-reference","i-lucide-refresh-cw",{"title":72,"path":73,"stem":74,"children":75,"icon":90},"MCP Server","\u002Fmcp-server","4.mcp-server\u002F1.index",[76,78,82,86],{"title":77,"path":73,"stem":74},"Viio MCP Server",{"title":79,"path":80,"stem":81},"Setup","\u002Fmcp-server\u002Fsetup","4.mcp-server\u002F2.setup",{"title":83,"path":84,"stem":85},"Available Tools","\u002Fmcp-server\u002Ftools","4.mcp-server\u002F3.tools",{"title":87,"path":88,"stem":89},"SaaS Analysis Use Cases","\u002Fmcp-server\u002Fuse-cases","4.mcp-server\u002F4.use-cases","i-lucide-bot",{"title":92,"path":93,"stem":94,"children":95,"icon":98},"AI Integration","\u002Fai","5.ai\u002F1.index",[96],{"title":97,"path":93,"stem":94},"llms.txt","i-lucide-sparkles",{"id":100,"title":101,"body":102,"dateModified":885,"datePublished":885,"description":886,"extension":887,"links":888,"meta":889,"navigation":890,"path":891,"seo":892,"stem":895,"__hash__":896},"docs\u002F3.sync-api\u002F5.api-reference\u002F3.python.md","Python SDK",{"type":103,"value":104,"toc":877},"minimark",[105,126,131,166,169,173,567,571,673,684,688,751,754,758,846,851,855,867,873],[106,107,108,109,120,121,125],"p",{},"This guide covers behavior specific to ",[110,111,115,119],"a",{"href":112,"rel":113},"https:\u002F\u002Fpypi.org\u002Fproject\u002Fviio-sync-api-sdk\u002F0.2.0\u002F",[114],"nofollow",[116,117,118],"code",{},"viio-sync-api-sdk"," 0.2.0",". For record types and fields, use the ",[110,122,124],{"href":123},"\u002Fsync-api\u002Fapi-reference\u002Fmodels","Model Reference",".",[127,128,130],"h2",{"id":129},"installation","Installation",[132,133,138],"pre",{"className":134,"code":135,"language":136,"meta":137,"style":137},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","python -m pip install viio-sync-api-sdk==0.2.0\n","bash","",[116,139,140],{"__ignoreMap":137},[141,142,145,149,153,156,159,162],"span",{"class":143,"line":144},"line",1,[141,146,148],{"class":147},"sBMFI","python",[141,150,152],{"class":151},"sfazB"," -m",[141,154,155],{"class":151}," pip",[141,157,158],{"class":151}," install",[141,160,161],{"class":151}," viio-sync-api-sdk==",[141,163,165],{"class":164},"sbssI","0.2.0\n",[106,167,168],{},"Python 3.11 and later are supported.",[127,170,172],{"id":171},"usage","Usage",[132,174,177],{"className":175,"code":176,"language":148,"meta":137,"style":137},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from viio_sync_api import SyncApiAuthentication, SyncApiClient, SyncApiClientOptions\nfrom viio_sync_api.v1 import Account, AccountRecords, GenericAccountDetails, SyncRecordsRequest\n\n\noptions = SyncApiClientOptions(\n    endpoint=\"https:\u002F\u002Fsync.viio.io\",\n    authentication=SyncApiAuthentication.api_key(api_key),\n)\n\nasync with SyncApiClient(options) as client:\n    batch = await client.start_batch(installation_id)\n    try:\n        await batch.write(\n            SyncRecordsRequest(\n                accounts=AccountRecords(\n                    records=[\n                        Account(\n                            generic=GenericAccountDetails(\n                                id=\"account-1\",\n                                email=\"person@example.com\",\n                            )\n                        )\n                    ]\n                )\n            )\n        )\n        await batch.complete()\n    except BaseException:\n        await batch.abort()\n        raise\n",[116,178,179,207,240,247,252,268,288,312,318,323,351,376,384,400,408,421,430,438,451,468,485,491,497,503,509,515,521,536,547,561],{"__ignoreMap":137},[141,180,181,185,189,192,195,199,202,204],{"class":143,"line":144},[141,182,184],{"class":183},"s7zQu","from",[141,186,188],{"class":187},"sTEyZ"," viio_sync_api ",[141,190,191],{"class":183},"import",[141,193,194],{"class":187}," SyncApiAuthentication",[141,196,198],{"class":197},"sMK4o",",",[141,200,201],{"class":187}," SyncApiClient",[141,203,198],{"class":197},[141,205,206],{"class":187}," SyncApiClientOptions\n",[141,208,210,212,215,217,220,222,225,227,230,232,235,237],{"class":143,"line":209},2,[141,211,184],{"class":183},[141,213,214],{"class":187}," viio_sync_api",[141,216,125],{"class":197},[141,218,219],{"class":187},"v1 ",[141,221,191],{"class":183},[141,223,224],{"class":187}," Account",[141,226,198],{"class":197},[141,228,229],{"class":187}," AccountRecords",[141,231,198],{"class":197},[141,233,234],{"class":187}," GenericAccountDetails",[141,236,198],{"class":197},[141,238,239],{"class":187}," SyncRecordsRequest\n",[141,241,243],{"class":143,"line":242},3,[141,244,246],{"emptyLinePlaceholder":245},true,"\n",[141,248,250],{"class":143,"line":249},4,[141,251,246],{"emptyLinePlaceholder":245},[141,253,255,258,261,265],{"class":143,"line":254},5,[141,256,257],{"class":187},"options ",[141,259,260],{"class":197},"=",[141,262,264],{"class":263},"s2Zo4"," SyncApiClientOptions",[141,266,267],{"class":197},"(\n",[141,269,271,275,277,280,283,285],{"class":143,"line":270},6,[141,272,274],{"class":273},"sHdIc","    endpoint",[141,276,260],{"class":197},[141,278,279],{"class":197},"\"",[141,281,282],{"class":151},"https:\u002F\u002Fsync.viio.io",[141,284,279],{"class":197},[141,286,287],{"class":197},",\n",[141,289,291,294,296,299,301,304,307,309],{"class":143,"line":290},7,[141,292,293],{"class":273},"    authentication",[141,295,260],{"class":197},[141,297,298],{"class":263},"SyncApiAuthentication",[141,300,125],{"class":197},[141,302,303],{"class":263},"api_key",[141,305,306],{"class":197},"(",[141,308,303],{"class":263},[141,310,311],{"class":197},"),\n",[141,313,315],{"class":143,"line":314},8,[141,316,317],{"class":197},")\n",[141,319,321],{"class":143,"line":320},9,[141,322,246],{"emptyLinePlaceholder":245},[141,324,326,329,332,334,336,339,342,345,348],{"class":143,"line":325},10,[141,327,328],{"class":183},"async",[141,330,331],{"class":183}," with",[141,333,201],{"class":263},[141,335,306],{"class":197},[141,337,338],{"class":263},"options",[141,340,341],{"class":197},")",[141,343,344],{"class":183}," as",[141,346,347],{"class":187}," client",[141,349,350],{"class":197},":\n",[141,352,354,357,359,362,364,366,369,371,374],{"class":143,"line":353},11,[141,355,356],{"class":187},"    batch ",[141,358,260],{"class":197},[141,360,361],{"class":183}," await",[141,363,347],{"class":187},[141,365,125],{"class":197},[141,367,368],{"class":263},"start_batch",[141,370,306],{"class":197},[141,372,373],{"class":263},"installation_id",[141,375,317],{"class":197},[141,377,379,382],{"class":143,"line":378},12,[141,380,381],{"class":183},"    try",[141,383,350],{"class":197},[141,385,387,390,393,395,398],{"class":143,"line":386},13,[141,388,389],{"class":183},"        await",[141,391,392],{"class":187}," batch",[141,394,125],{"class":197},[141,396,397],{"class":263},"write",[141,399,267],{"class":197},[141,401,403,406],{"class":143,"line":402},14,[141,404,405],{"class":263},"            SyncRecordsRequest",[141,407,267],{"class":197},[141,409,411,414,416,419],{"class":143,"line":410},15,[141,412,413],{"class":273},"                accounts",[141,415,260],{"class":197},[141,417,418],{"class":263},"AccountRecords",[141,420,267],{"class":197},[141,422,424,427],{"class":143,"line":423},16,[141,425,426],{"class":273},"                    records",[141,428,429],{"class":197},"=[\n",[141,431,433,436],{"class":143,"line":432},17,[141,434,435],{"class":263},"                        Account",[141,437,267],{"class":197},[141,439,441,444,446,449],{"class":143,"line":440},18,[141,442,443],{"class":273},"                            generic",[141,445,260],{"class":197},[141,447,448],{"class":263},"GenericAccountDetails",[141,450,267],{"class":197},[141,452,454,457,459,461,464,466],{"class":143,"line":453},19,[141,455,456],{"class":273},"                                id",[141,458,260],{"class":197},[141,460,279],{"class":197},[141,462,463],{"class":151},"account-1",[141,465,279],{"class":197},[141,467,287],{"class":197},[141,469,471,474,476,478,481,483],{"class":143,"line":470},20,[141,472,473],{"class":273},"                                email",[141,475,260],{"class":197},[141,477,279],{"class":197},[141,479,480],{"class":151},"person@example.com",[141,482,279],{"class":197},[141,484,287],{"class":197},[141,486,488],{"class":143,"line":487},21,[141,489,490],{"class":197},"                            )\n",[141,492,494],{"class":143,"line":493},22,[141,495,496],{"class":197},"                        )\n",[141,498,500],{"class":143,"line":499},23,[141,501,502],{"class":197},"                    ]\n",[141,504,506],{"class":143,"line":505},24,[141,507,508],{"class":197},"                )\n",[141,510,512],{"class":143,"line":511},25,[141,513,514],{"class":197},"            )\n",[141,516,518],{"class":143,"line":517},26,[141,519,520],{"class":197},"        )\n",[141,522,524,526,528,530,533],{"class":143,"line":523},27,[141,525,389],{"class":183},[141,527,392],{"class":187},[141,529,125],{"class":197},[141,531,532],{"class":263},"complete",[141,534,535],{"class":197},"()\n",[141,537,539,542,545],{"class":143,"line":538},28,[141,540,541],{"class":183},"    except",[141,543,544],{"class":147}," BaseException",[141,546,350],{"class":197},[141,548,550,552,554,556,559],{"class":143,"line":549},29,[141,551,389],{"class":183},[141,553,392],{"class":187},[141,555,125],{"class":197},[141,557,558],{"class":263},"abort",[141,560,535],{"class":197},[141,562,564],{"class":143,"line":563},30,[141,565,566],{"class":183},"        raise\n",[127,568,570],{"id":569},"client-configuration","Client Configuration",[572,573,574,593],"table",{},[575,576,577],"thead",{},[578,579,580,584,587,590],"tr",{},[581,582,583],"th",{},"Field",[581,585,586],{},"Required",[581,588,589],{},"Default",[581,591,592],{},"Description",[594,595,596,613,627,643,658],"tbody",{},[578,597,598,604,607,610],{},[599,600,601],"td",{},[116,602,603],{},"endpoint",[599,605,606],{},"Yes",[599,608,609],{},"—",[599,611,612],{},"HTTPS Sync API endpoint; HTTP is allowed only for loopback development",[578,614,615,620,622,624],{},[599,616,617],{},[116,618,619],{},"authentication",[599,621,606],{},[599,623,609],{},[599,625,626],{},"API-key or Viio-managed authentication",[578,628,629,634,637,640],{},[599,630,631],{},[116,632,633],{},"max_receive_message_size",[599,635,636],{},"No",[599,638,639],{},"16 MiB",[599,641,642],{},"Maximum response-message size accepted by the client",[578,644,645,650,652,655],{},[599,646,647],{},[116,648,649],{},"max_send_message_size",[599,651,636],{},[599,653,654],{},"gRPC default",[599,656,657],{},"Maximum request-message size",[578,659,660,665,667,670],{},[599,661,662],{},[116,663,664],{},"timeout",[599,666,636],{},[599,668,669],{},"100 seconds",[599,671,672],{},"Positive per-operation timeout",[106,674,675,676,679,680,683],{},"Customer-managed integrations use ",[116,677,678],{},"SyncApiAuthentication.api_key(api_key)",". The key must have the ",[116,681,682],{},"integration:sync"," permission and belong to the target installation's workspace.",[127,685,687],{"id":686},"batch-lifecycle","Batch Lifecycle",[572,689,690,699],{},[575,691,692],{},[578,693,694,697],{},[581,695,696],{},"Member",[581,698,592],{},[594,700,701,711,721,731,741],{},[578,702,703,708],{},[599,704,705],{},[116,706,707],{},"batch_id",[599,709,710],{},"Server-generated batch identifier",[578,712,713,718],{},[599,714,715],{},[116,716,717],{},"await write(request)",[599,719,720],{},"Send one typed collection",[578,722,723,728],{},[599,724,725],{},[116,726,727],{},"await complete()",[599,729,730],{},"Complete the batch and make the local handle terminal",[578,732,733,738],{},[599,734,735],{},[116,736,737],{},"await abort()",[599,739,740],{},"Abort the batch and make the local handle terminal",[578,742,743,748],{},[599,744,745],{},[116,746,747],{},"close()",[599,749,750],{},"Release local resources without completing or aborting the server batch",[106,752,753],{},"Writes are serialized. A successful completion or abort rejects later operations on the same batch object.",[127,755,757],{"id":756},"error-handling","Error Handling",[572,759,760,770],{},[575,761,762],{},[578,763,764,767],{},[581,765,766],{},"Error",[581,768,769],{},"Meaning",[594,771,772,782,792,802,812,822,832],{},[578,773,774,779],{},[599,775,776],{},[116,777,778],{},"SyncApiBatchAlreadyInProgressError",[599,780,781],{},"Another batch owns the installation lock",[578,783,784,789],{},[599,785,786],{},[116,787,788],{},"SyncApiProtocolError",[599,790,791],{},"The server rejected an SDK operation",[578,793,794,799],{},[599,795,796],{},[116,797,798],{},"SyncApiAuthenticationError",[599,800,801],{},"Authentication could not produce a usable credential",[578,803,804,809],{},[599,805,806],{},[116,807,808],{},"SyncApiBatchStateError",[599,810,811],{},"The batch was already completed or aborted",[578,813,814,819],{},[599,815,816],{},[116,817,818],{},"SyncApiClosedError",[599,820,821],{},"The client or batch was closed",[578,823,824,829],{},[599,825,826],{},[116,827,828],{},"grpc.aio.AioRpcError",[599,830,831],{},"Transport or server RPC failure",[578,833,834,843],{},[599,835,836,839,840],{},[116,837,838],{},"TypeError"," or ",[116,841,842],{},"ValueError",[599,844,845],{},"Invalid client input or configuration",[106,847,848,849,125],{},"For retry and abort guidance, see the ",[110,850,60],{"href":61},[127,852,854],{"id":853},"requests-and-models","Requests and Models",[106,856,857,859,860,863,864,866],{},[116,858,397],{}," accepts ",[116,861,862],{},"SyncRecordsRequest",". Set exactly one typed collection per call; the SDK adds ",[116,865,707],{}," automatically.",[106,868,869,870,872],{},"The dedicated ",[110,871,124],{"href":123}," lists every supported collection and record field, including its Python name, type, and requiredness.",[874,875,876],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}",{"title":137,"searchDepth":144,"depth":209,"links":878},[879,880,881,882,883,884],{"id":129,"depth":209,"text":130},{"id":171,"depth":209,"text":172},{"id":569,"depth":209,"text":570},{"id":686,"depth":209,"text":687},{"id":756,"depth":209,"text":757},{"id":853,"depth":209,"text":854},"2026-08-06","Install, configure, and handle lifecycle and errors with the Viio Sync API Python SDK.","md",null,{},false,"\u002Fsync-api\u002Fapi-reference\u002Fpython",{"title":893,"description":894},"Viio Sync API Python SDK","Install and configure the Viio Sync API Python SDK and learn its lifecycle and error-handling behavior.","3.sync-api\u002F5.api-reference\u002F3.python","Y-KpV9LKGgeOkprJWgwHJfs8Srv5DRLZJc9rQK-MbLw",[888,888],1787319043675]