Viio Sync API SDK for Python
viio-sync-api-sdk contains the generated viio.sync.v1 protobuf contract and an AsyncIO client for authentication and
explicit sync-batch lifecycle management.
Install
python -m pip install viio-sync-api-sdk
Python 3.11 and later are supported without an artificial upper minor-version cap. CI validates the minimum version and the latest stable Python release, so the upper tested version advances automatically.
Send a batch
from viio_sync_api import SyncApiAuthentication, SyncApiClient, SyncApiClientOptions
from viio_sync_api.v1 import Account, AccountRecords, GenericAccountDetails, SyncRecordsRequest
async def sync_accounts() -> None:
options = SyncApiClientOptions(
endpoint="https://sync.example.com",
authentication=SyncApiAuthentication.api_key("your-api-key"),
)
async with SyncApiClient(options) as client:
batch = await client.start_batch("installation-id")
try:
await batch.write(
SyncRecordsRequest(
accounts=AccountRecords(
records=[
Account(
generic=GenericAccountDetails(
id="account-1",
email="person@example.com",
)
)
]
)
)
)
await batch.complete()
except BaseException:
await batch.abort()
raise
Each write accepts exactly one typed records wrapper. A present empty wrapper represents an intentional empty snapshot:
await batch.write(SyncRecordsRequest(accounts=AccountRecords()))
SyncApiBatchAlreadyInProgressError distinguishes an existing sync. Protocol failures raise
SyncApiProtocolError. Native grpc.aio.AioRpcError, cancellation, and timeout errors remain available for retry
decisions.
The authenticated generated stub is available as client.grpc_client. Calls through it bypass batch validation.
max_receive_message_size caps individual responses received by this client, while max_send_message_size caps
individual requests it sends. The receive limit defaults to 16 MiB to match the .NET SDK; setting either value to
None leaves that direction at gRPC's default.
AWS Lambda
The Viio developer portal provides a complete Lambda handler and AWS SAM
template. The handler acquires an application token from Microsoft Entra ID, pages through Microsoft Graph users, maps
each user to MicrosoftEmployeeDetails, writes a complete employee snapshot, and completes or aborts the Sync API
batch. The template configures Amazon EventBridge Scheduler to invoke it every night with cron(0 2 * * ? *).
Grant the Entra application the Microsoft Graph User.Read.All application permission and supply these Lambda
environment variables from your secret-management system:
MICROSOFT_TENANT_IDMICROSOFT_CLIENT_IDMICROSOFT_CLIENT_SECRETVIIO_SYNC_API_ENDPOINTVIIO_SYNC_API_KEYVIIO_DIRECT_INTEGRATION_INSTALLATION_ID
The example creates and closes the client inside each invocation's event loop. This avoids retaining a gRPC AsyncIO channel across event loops when Lambda reuses a warm execution environment.
grpcio contains native code. When creating a Lambda ZIP or layer on another operating system, ask pip for the
matching Linux wheel:
# x86_64
python -m pip install \
--platform manylinux2014_x86_64 \
--implementation cp \
--python-version 3.11 \
--only-binary=:all: \
--target package \
viio-sync-api-sdk
# arm64
python -m pip install \
--platform manylinux2014_aarch64 \
--implementation cp \
--python-version 3.11 \
--only-binary=:all: \
--target package \
viio-sync-api-sdk
Replace 3.11 with the Python version of the target Lambda runtime. The same package can be installed normally in AWS
Lambda Python container images. Full API documentation is available at https://developers.viio.io/sync-api.
Authentication and transport security
External integrations use API keys. Viio-managed callers can supply an asynchronous bearer-token provider.
Sync API endpoints must use HTTPS. HTTP is accepted only for loopback endpoints during development. SDK exception messages and representations do not include keys or bearer tokens.
License
MIT
Metadata
Release files for viio-sync-api-sdk 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| viio_sync_api_sdk-0.5.0.tar.gz | 39.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| viio_sync_api_sdk-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 97.4 kB
Release files / viio_sync_api_sdk-0.5.0.tar.gz
| Download URL | viio_sync_api_sdk-0.5.0.tar.gz |
|---|---|
| Size | 39.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a37cc3e4672f4b65cc6664c4cd62a014254a5aa3243ca40c5a4f554999662a1d
|
|
BLAKE2b-256 checksum How to use checksums |
5cc9fffd85f4751bd48dadfd6f31d15606b20bec9446d010a0e2d5210234e1a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / viio_sync_api_sdk-0.5.0-py3-none-any.whl
| Download URL | viio_sync_api_sdk-0.5.0-py3-none-any.whl |
|---|---|
| Size | 57.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
845f0c19b3ba57ace22867e0bf53aaa8af10450ba3f9dee887bc29ccdf5d644b
|
|
BLAKE2b-256 checksum How to use checksums |
c136cf7e5d7d4fe5362fd434f05a84c2d2e888c4c64639b22c38fd4cb4f5334e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logSecurity for viio-sync-api-sdk 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for viio_sync_api_sdk-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.