Skip to content

Python SDK

A typed method for every API operation, sync or asyncio.

Latest release0.1.1PyPI

View as Markdown (opens in a new tab)
Agent setup

Install

Python 3.11 or later. You also need OAuth2 credentials: the client ID and secret of a service account.

Terminal

pip install ovhcloud

First program

This prints the details of your account: `GET /v1/me`. Copy it, set your credentials, run it.

Python
import ovhcloud with ovhcloud.Client() as client: # reads OVH_CLIENT_ID, OVH_CLIENT_SECRET, OVH_REGION account = client.me.get_account_details() # GET /v1/me print("account:", account.nichandle) print("email: ", account.email) print("country:", account.country)

Run it

Terminal
export OVH_CLIENT_ID=... OVH_CLIENT_SECRET=...export OVH_REGION=eu # eu (default), ca or uspython first.py
NextGo SDK →