Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -34,4 +34,5 @@ jobs:
- name: Test with pytest
run: pytest --junitxml=junit/test-results.xml --cov=ovh --cov-report=xml --cov-report=html --cov-report=lcov:coverage/cov.info
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2.0.0
uses: coverallsapp/github-action@v2
continue-on-error: true
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013-2025, OVH SAS.
Copyright (c) 2013-2026, OVH SAS.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
34 changes: 17 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ credential creation and requests signing.

import ovh

# Instantiate. Visit https://api.ovh.com/createToken/?GET=/me
# Instantiate. Visit https://auth.eu.ovhcloud.com/api/createToken/?GET=/me
# to get your credentials
client = ovh.Client(
endpoint='ovh-eu',
Expand Down Expand Up @@ -73,9 +73,9 @@ To interact with the APIs, the SDK needs to identify itself using an
``application_key`` and an ``application_secret``. To get them, you need
to register your application. Depending the API you plan to use, visit:

- `OVHcloud Europe <https://eu.api.ovh.com/createApp/>`_
- `OVHcloud Europe <https://auth.eu.ovhcloud.com/api/createApp/>`_
- `OVHcloud US <https://api.us.ovhcloud.com/createApp/>`_
- `OVHcloud North-America <https://ca.api.ovh.com/createApp/>`_
- `OVHcloud North-America <https://auth.ca.ovhcloud.com/api/createApp/>`_
- `So you Start Europe <https://eu.api.soyoustart.com/createApp/>`_
- `So you Start North America <https://ca.api.soyoustart.com/createApp/>`_
- `Kimsufi Europe <https://eu.api.kimsufi.com/createApp/>`_
Expand Down Expand Up @@ -436,23 +436,23 @@ Use v1 and v2 API versions
When using OVHcloud APIs (not So you Start or Kimsufi ones), you are given the
opportunity to aim for two API versions. For the European API, for example:

- the v1 is reachable through https://eu.api.ovh.com/v1
- the v2 is reachable through https://eu.api.ovh.com/v2
- the legacy URL is https://eu.api.ovh.com/1.0
- the v1 is reachable through https://api.eu.ovhcloud.com/v1
- the v2 is reachable through https://api.eu.ovhcloud.com/v2
- the legacy URL is https://api.eu.ovhcloud.com/1.0

Calling ``client.get``, you can target the API version you want:

.. code:: python

client = ovh.Client(endpoint="ovh-eu")

# Call to https://eu.api.ovh.com/v1/xdsl/xdsl-yourservice
# Call to https://api.eu.ovhcloud.com/v1/xdsl/xdsl-yourservice
client.get("/v1/xdsl/xdsl-yourservice")

# Call to https://eu.api.ovh.com/v2/xdsl/xdsl-yourservice
# Call to https://api.eu.ovhcloud.com/v2/xdsl/xdsl-yourservice
client.get("/v2/xdsl/xdsl-yourservice")

# Legacy call to https://eu.api.ovh.com/1.0/xdsl/xdsl-yourservice
# Legacy call to https://api.eu.ovhcloud.com/1.0/xdsl/xdsl-yourservice
client.get("/xdsl/xdsl-yourservice")

Custom configuration file
Expand Down Expand Up @@ -567,11 +567,11 @@ Supported APIs
OVHcloud Europe
---------------

- **Documentation**: https://eu.api.ovh.com/
- **Documentation**: https://api.eu.ovhcloud.com/
- **Community support**: api-subscribe@ml.ovh.net
- **Console**: https://eu.api.ovh.com/console
- **Create application credentials**: https://eu.api.ovh.com/createApp/
- **Create script credentials** (all keys at once): https://eu.api.ovh.com/createToken/
- **Console**: https://api.eu.ovhcloud.com/console
- **Create application credentials**: https://auth.eu.ovhcloud.com/api/createApp/
- **Create script credentials** (all keys at once): https://auth.eu.ovhcloud.com/api/createToken/

OVHcloud US
-----------
Expand All @@ -584,11 +584,11 @@ OVHcloud US
OVHcloud North America
----------------------

- **Documentation**: https://ca.api.ovh.com/
- **Documentation**: https://api.ca.ovhcloud.com/
- **Community support**: api-subscribe@ml.ovh.net
- **Console**: https://ca.api.ovh.com/console
- **Create application credentials**: https://ca.api.ovh.com/createApp/
- **Create script credentials** (all keys at once): https://ca.api.ovh.com/createToken/
- **Console**: https://api.ca.ovhcloud.com/console
- **Create application credentials**: https://auth.ca.ovhcloud.com/api/createApp/
- **Create script credentials** (all keys at once): https://auth.ca.ovhcloud.com/api/createToken/

So you Start Europe
-------------------
Expand Down
4 changes: 2 additions & 2 deletions debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ Upstream-Name: python-ovh
Source: https://github.com/ovh/python-ovh

Files: *
Copyright: 2013-2025 OVH SAS
Copyright: 2013-2026 OVH SAS
License: 3-clause BSD
See LICENSE


Files: debian/*
Copyright: 2013-2025 OVH SAS
Copyright: 2013-2026 OVH SAS
License: 3-clause BSD
See LICENSE
18 changes: 9 additions & 9 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ creation and requests signing.

import ovh

# Instantiate. Visit https://api.ovh.com/createToken/index.cgi?GET=/me
# Instantiate. Visit https://auth.eu.ovhcloud.com/api/createToken/index.cgi?GET=/me
# to get your credentials
client = ovh.Client(
endpoint='ovh-eu',
Expand Down Expand Up @@ -63,8 +63,8 @@ To interact with the APIs, the SDK needs to identify itself using an
``application_key`` and an ``application_secret``. To get them, you need
to register your application. Depending the API you plan yo use, visit:

- `OVH Europe <https://eu.api.ovh.com/createApp/>`_
- `OVH North-America <https://ca.api.ovh.com/createApp/>`_
- `OVH Europe <https://auth.eu.ovhcloud.com/api/createApp/>`_
- `OVH North-America <https://auth.ca.ovhcloud.com/api/createApp/>`_

Once created, you will obtain an **application key (AK)** and an **application
secret (AS)**.
Expand Down Expand Up @@ -420,18 +420,18 @@ Supported APIs
OVH Europe
----------

- **Documentation**: https://eu.api.ovh.com/
- **Documentation**: https://api.eu.ovhcloud.com/
- **Community support**: api-subscribe@ml.ovh.net
- **Console**: https://eu.api.ovh.com/console
- **Create application credentials**: https://eu.api.ovh.com/createApp/
- **Console**: https://api.eu.ovhcloud.com/console
- **Create application credentials**: https://auth.eu.ovhcloud.com/api/createApp/

OVH North America
-----------------

- **Documentation**: https://ca.api.ovh.com/
- **Documentation**: https://api.ca.ovhcloud.com/
- **Community support**: api-subscribe@ml.ovh.net
- **Console**: https://ca.api.ovh.com/console
- **Create application credentials**: https://ca.api.ovh.com/createApp/
- **Console**: https://api.ca.ovhcloud.com/console
- **Create application credentials**: https://auth.ca.ovhcloud.com/api/createApp/

Related links
=============
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pip install tabulate ovh

## Create a new token

You can create a new token using this url: [https://api.ovh.com/createToken/?GET=/*](https://api.ovh.com/createToken/?GET=/*).
You can create a new token using this url: [https://auth.eu.ovhcloud.com/api/createToken/?GET=/*](https://auth.eu.ovhcloud.com/api/createToken/?GET=/*).
Keep application key, application secret and consumer key and replace default values in ```ovh.conf``` file.

```ini
Expand Down Expand Up @@ -60,5 +60,5 @@ router router-rbx-1-sdr-1337 expired 2016-01-31

## What's more?

You can discover all OVH possibilities by using API console to show all available endpoints: [https://api.ovh.com/console](https://api.ovh.com/console)
You can discover all OVH possibilities by using API console to show all available endpoints: [https://api.eu.ovhcloud.com/console](https://api.eu.ovhcloud.com/console)

4 changes: 2 additions & 2 deletions examples/serviceList/api_get_service_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pip install tabulate ovh

## Create a new token

You can create a new token using this url: [https://api.ovh.com/createToken/?GET=/*](https://api.ovh.com/createToken/?GET=/*).
You can create a new token using this url: [https://auth.eu.ovhcloud.com/api/createToken/?GET=/*](https://auth.eu.ovhcloud.com/api/createToken/?GET=/*).
Keep application key, application secret and consumer key and replace default values in ```ovh.conf``` file.

```ini
Expand Down Expand Up @@ -60,5 +60,5 @@ router router-rbx-1-sdr-1337 expired 2016-01-31

## What's more?

You can discover all OVH possibilities by using API console to show all available endpoints: [https://api.ovh.com/console](https://api.ovh.com/console)
You can discover all OVH possibilities by using API console to show all available endpoints: [https://api.eu.ovhcloud.com/console](https://api.eu.ovhcloud.com/console)

2 changes: 1 addition & 1 deletion ovh/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
14 changes: 7 additions & 7 deletions ovh/client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -28,7 +28,7 @@
This module provides a simple python wrapper over the OVH REST API.
It handles requesting credential, signing queries...

- To get your API keys: https://eu.api.ovh.com/createApp/
- To get your API keys: https://auth.eu.ovhcloud.com/api/createApp/
- To get started with API:
https://help.ovhcloud.com/csm/en-gb-api-getting-started-ovhcloud-api?id=kb_article_view&sysparm_article=KB0042784
"""
Expand Down Expand Up @@ -65,9 +65,9 @@

# Mapping between OVH API region names and corresponding endpoints
ENDPOINTS = {
"ovh-eu": "https://eu.api.ovh.com/1.0",
"ovh-eu": "https://api.eu.ovhcloud.com/1.0",
"ovh-us": "https://api.us.ovhcloud.com/1.0",
"ovh-ca": "https://ca.api.ovh.com/1.0",
"ovh-ca": "https://api.ca.ovhcloud.com/1.0",
"kimsufi-eu": "https://eu.api.kimsufi.com/1.0",
"kimsufi-ca": "https://ca.api.kimsufi.com/1.0",
"soyoustart-eu": "https://eu.api.soyoustart.com/1.0",
Expand All @@ -79,8 +79,8 @@

# OAuth2 token provider URLs
OAUTH2_TOKEN_URLS = {
"ovh-eu": "https://www.ovh.com/auth/oauth2/token",
"ovh-ca": "https://ca.ovh.com/auth/oauth2/token",
"ovh-eu": "https://auth.eu.ovhcloud.com/oauth2/token",
"ovh-ca": "https://auth.ca.ovhcloud.com/oauth2/token",
"ovh-us": "https://us.ovhcloud.com/auth/oauth2/token",
}

Expand Down Expand Up @@ -284,7 +284,7 @@ def new_consumer_key_request(self):
{
'state': 'pendingValidation',
'consumerKey': 'TnpZAd5pYNqxk4RhlPiSRfJ4WrkmII2i',
'validationUrl': 'https://eu.api.ovh.com/auth/?credentialToken=now2OOAVO4Wp6t7bemyN9DMWIobhGjFNZSHmixtVJM4S7mzjkN2L5VBfG96Iy1i0'
'validationUrl': 'https://api.eu.ovhcloud.com/auth/?credentialToken=now2OOAVO4Wp6t7bemyN9DMWIobhGjFNZSHmixtVJM4S7mzjkN2L5VBfG96Iy1i0'
}
""" # noqa:E501
return ConsumerKeyRequest(self)
Expand Down
2 changes: 1 addition & 1 deletion ovh/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions ovh/consumer_key.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -70,7 +70,7 @@ def request(self, redirect_url=None, allowedIPs=None):
{
'state': 'pendingValidation',
'consumerKey': 'TnpZAd5pYNqxk4RhlPiSRfJ4WrkmII2i',
'validationUrl': 'https://eu.api.ovh.com/auth/?credentialToken=now2OOAVO4Wp6t7bemyN9DMWIobhGjFNZSHmixtVJM4S7mzjkN2L5VBfG96Iy1i0'
'validationUrl': 'https://api.eu.ovhcloud.com/auth/?credentialToken=now2OOAVO4Wp6t7bemyN9DMWIobhGjFNZSHmixtVJM4S7mzjkN2L5VBfG96Iy1i0'
}
""" # noqa: E501
return self._client.request_consumerkey(self._access_rules, redirect_url, allowedIPs)
Expand Down
2 changes: 1 addition & 1 deletion ovh/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion ovh/oauth2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ long_description = file: README.rst
version = 1.2.0
author = OVHcloud team - Romain Beuque
author_email = api@ml.ovh.net
url = https://api.ovh.com
url = https://api.eu.ovhcloud.com
license = BSD
license_file = LICENSE
project_urls =
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
Loading
Loading