Skip to main content

aioovh

Asynchronous, fully typed Python client for every OVHcloud API, versions 1.0 and v2, built on httpx2, pydantic and whenever.

Documentation: https://aioovh.businessagile.eu

from whenever import Date

from aioovh import OVH

async with OVH() as ovh:  # OVH_* from the environment
    async for bill in ovh.billing.bills.filter(date_from=Date(2026, 10, 1)):
        print(bill.bill_id, bill.date, bill.price_without_tax.value)
        async for line in bill.details:
            print("  ", line.description, line.total_price.value)

    await ovh.compute.vps("vps-1234.vps.ovh.net").reboot()
    account = await ovh.account

Why it exists

The official ovh package is synchronous and untyped: client.get("/me/bill/FR123") blocks the event loop and returns a dict, and the paths are the API's own (/me, /cloud/project/{id}/...).

aioovh is asynchronous down to the socket and organised around what you manipulate:

  • business areas shared with its sibling aioscaleway: compute, storage, network, billing, domains, email, telecom...; /me disappears, its content goes where it belongs (ovh.billing.bills, ovh.iam.ssh_keys);
  • collections you iterate with async for and narrow with filter(); the 1.0 lists of identifiers are loaded for you, a few objects at a time, and the v2 cursor pages are followed;
  • references that act without a request to read them first, and that await loads; objects that are references too, with typed fields;
  • no API version in any name;
  • the $1$ request signature on the exact URL and body sent, with the clock offset read once from /auth/time, or an OAuth2 bearer token.

Everything is generated from the schemas the API serves, committed in specs/: 88 APIs and about 7,300 operations. Every operation is reachable, through the objects or through ovh.raw, and docs/coverage.md says where.

Installation

uv add aioovh

Python 3.12 or later.

Usage

Client

ovh = OVH(
    endpoint="ovh-eu",
    application_key="...",
    application_secret="...",
    consumer_key="...",
    default_project="...",  # Public Cloud project used when none is given
)

Every value left out is read from the variables of the official package (OVH_ENDPOINT, OVH_APPLICATION_KEY, OVH_APPLICATION_SECRET, OVH_CONSUMER_KEY, OVH_CLIENT_ID, OVH_CLIENT_SECRET), plus OVH_DEFAULT_PROJECT and OVH_MAX_CONCURRENCY (objects loaded at once when a list only returns identifiers, 8 by default).

Collections, references, objects

You write You get Requests
ovh.billing.bills a collection none
ovh.billing.bills.filter(date_from=Date(2026, 10, 1)) the same collection, narrowed none
async for b in ovh.billing.bills loaded objects the list, then one per object
ovh.billing.bills(bill_id) a reference none
await ovh.billing.bills(bill_id) a loaded object one
await ovh.compute.vps(name).reboot() the action's result one
[i async for i in ovh.billing.bills.ids()] identifiers only one

A loaded object is also a reference. It cannot load itself when printed or read, because those are synchronous; mypy flags a field read on a bare reference.

Public Cloud resources take their project as a keyword, defaulting to default_project:

async for instance in ovh.compute.instances.filter(project=project_id):
    ...

Names

Collections are named after what they hold (bills, dedicated_servers, ssh_keys); under them, the OVHcloud segments in snake case (bill.details, server.service_infos()). Actions are methods named after their path (reboot(), change_contact()), updates update_.... The full tree is in docs/objects.md.

Types and errors

Arguments and fields are typed; enumerations and nested models of an area live in its types module. Dates are whenever.Instant and whenever.Date. Enumerations are open.

from aioovh import NotGrantedCallError, OVHAPIError, ResourceNotFoundError

try:
    await ovh.billing.bills("FR123")
except NotGrantedCallError:
    ...  # the consumer key lacks this route
except OVHAPIError as error:
    print(error.status_code, error.error_code, error.message, error.query_id)

The raw layer

ovh.raw keeps the official package's untyped calls:

await ovh.raw.get("/me/bill", **{"date.from": "2026-10-01"})

Development

See CONTRIBUTING.md and docs/architecture.md.

The source lives on GitLab, mirrored to GitHub, where issues and pull requests are welcome.

Author

Created by Alexandre BERREBI, maintained by Business Agile.

License

MIT, see LICENSE.

Metadata

Release files for aioovh 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aioovh 0.1.0
File Size Uploaded Provenance Actions
aioovh-0.1.0.tar.gz 2.1 MB Without provenance Details for aioovh-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aioovh 0.1.0
File Interpreter ABI Platform Actions
aioovh-0.1.0-py3-none-any.whl Python 3 none any Details for aioovh-0.1.0-py3-none-any.whl

Total release size: 4.2 MB

Release files / aioovh-0.1.0.tar.gz

Download URL aioovh-0.1.0.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
0876a0eb51d5edfb8af8f9eccae89df26fdb8edb7269f69bc82149cf131c6893
BLAKE2b-256 checksum
How to use checksums
9f8a9fdf519f12cc035a84efe4cfa0fe57820f12a7c2216c826a301c35dea2a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / aioovh-0.1.0-py3-none-any.whl

Download URL aioovh-0.1.0-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
82cf2d5d28323428dc9fa739136efe377cde1141edf4123f8130ddde83b96181
BLAKE2b-256 checksum
How to use checksums
0c26680f824c955cecf64d31f591ee0233201fe057699c421a279e70aaaf9f16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for aioovh 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page