Veeam Backup for Azure REST API wrapper for Python
Project description
Veeam Backup for Azure Python API Wrapper
Python package for interacting with the Veeam Backup for Azure REST API
This project is an independent, open source Python client for the Veeam Backup for Azure REST API. It is not affiliated with, endorsed by, or sponsored by Veeam Software.
Supported Versions
| VBA Version | API Version | Supported |
|---|---|---|
| 8.1 | 8.1 | ✅ |
| < 8.1 | < 8.1 | ❌ |
How to support new API versions
- Download the OpenAPI schema into openapi_schemas
- Install the openapi-python-client package
- Run
python fix_openapi_schema.py .\openapi_schemas\vbaz_rest_{version}.json .\openapi_schemas\vbaz_rest_{version}_fixed.json - Run
openapi-python-client generate --path ".\openapi_schemas\vbaz_rest_{version}_fixed.json" --output-path ".\veeam_az" --overwrite - Fix any warnings/errors
- Rename the folder to match the API version (i.e.,
v8_1) - Add the version mapping to versions.py
- Write pytest tests
- If an older API has been deprecated, delete its folder, json, and version.py entry, then update the supported versions section of the readme
Install
From PyPi
pip install veeam-az
From Source
Clone the repository and install dependencies:
git clone https://github.com/Cenvora/veeam-az.git
cd veeam-az
pip install -e .
Usage
Recommended Usage (Smart Client)
The VeeamClient handles:
- API version routing
- Authentication (username/password or bearer token)
- Token refresh (password-based auth automatically re-authenticates on expiry)
- Async calls
- Operation discovery
Each packaged version can be called independently through separate imports, but this is the recommended way to use this library.
Create a client and connect
import asyncio
from veeam_az import VeeamClient
async def main():
vc = VeeamClient(
host="https://vbaz.example.com",
username="administrator",
password="SuperSecretPassword",
api_version="8.1",
verify_ssl=False,
)
await vc.connect()
# use the client...
await vc.close()
asyncio.run(main())
You can also authenticate with a pre-existing bearer token instead of a username/password. Token-based clients skip the login call and are never refreshed automatically:
vc = VeeamClient(
host="https://vbaz.example.com",
token="eyJhbGciOi...",
api_version="8.1",
verify_ssl=False,
)
await vc.connect()
Call an API endpoint (async)
policies = await vc.call(
vc.api("policy").policy_get_policies
)
Call any endpoint
Operations map directly to the OpenAPI layout. Each tag becomes a namespace folder and each operation becomes a module:
api/
└── policy/
└── policy_get_policies.py
Call it via the namespace:
await vc.call(
vc.api("policy").policy_get_policies
)
Or explicitly, with the operation on the same line:
await vc.call(
vc.api("policy.policy_get_policies")
)
Pass endpoint arguments as keyword arguments to call:
repo = await vc.call(
vc.api("repository").repository_get_repository,
repository_id="<repository-id>",
)
Pagination example
List endpoints accept offset and limit:
result = await vc.call(
vc.api("policy").policy_get_policies,
limit=50,
offset=0,
)
Close the client
await vc.close()
Contributing
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch
- Make your changes and add tests
- Submit a pull request with a clear description
Please follow PEP8 style and include docstrings for new functions/classes.
🤝 Core Contributors
This project is made possible thanks to the efforts of our core contributors:
We’re grateful for their continued support and contributions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file veeam_az-0.1.0.tar.gz.
File metadata
- Download URL: veeam_az-0.1.0.tar.gz
- Upload date:
- Size: 877.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
270fe4ae199e26f210db2cf898b1a237161da40642bc117d5861d85e3a79f63e
|
|
| MD5 |
84bfaeea5dbf4abcbf08596be1cb82c5
|
|
| BLAKE2b-256 |
3b18591c61b8f9f9161257dd55127e97e5d1c9610b0a455525df3f7c7b8137c8
|
Provenance
The following attestation bundles were made for veeam_az-0.1.0.tar.gz:
Publisher:
publish-on-release.yml on Cenvora/veeam-az
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
veeam_az-0.1.0.tar.gz -
Subject digest:
270fe4ae199e26f210db2cf898b1a237161da40642bc117d5861d85e3a79f63e - Sigstore transparency entry: 2038944208
- Sigstore integration time:
-
Permalink:
Cenvora/veeam-az@be6ecd8afb511835409cee813fa3edf980a6831d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Cenvora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-on-release.yml@be6ecd8afb511835409cee813fa3edf980a6831d -
Trigger Event:
push
-
Statement type:
File details
Details for the file veeam_az-0.1.0-py3-none-any.whl.
File metadata
- Download URL: veeam_az-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f0d2c7742a10865a7fd4d1dd92ea2674ad0c44dcb9e3e07be48dc9e31bee7d4
|
|
| MD5 |
904306f0d4b876f3f68b9e85e2e1a4fa
|
|
| BLAKE2b-256 |
b8a5a0bf79c66100c2149189201093f0fc1e81bb9cc6c37c40b39eabf723b945
|
Provenance
The following attestation bundles were made for veeam_az-0.1.0-py3-none-any.whl:
Publisher:
publish-on-release.yml on Cenvora/veeam-az
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
veeam_az-0.1.0-py3-none-any.whl -
Subject digest:
4f0d2c7742a10865a7fd4d1dd92ea2674ad0c44dcb9e3e07be48dc9e31bee7d4 - Sigstore transparency entry: 2038944252
- Sigstore integration time:
-
Permalink:
Cenvora/veeam-az@be6ecd8afb511835409cee813fa3edf980a6831d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Cenvora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-on-release.yml@be6ecd8afb511835409cee813fa3edf980a6831d -
Trigger Event:
push
-
Statement type: