Skip to main content

Project Graduated

Outscale Python SDK

Outscale Python SDK


🌐 Links


📄 Table of Contents


🧭 Overview

Outscale Python SDK (osc-sdk-python) is the official Python SDK to interact with the OUTSCALE API.

It allows you to:

  • Configure multiple profiles through environment variables or credential files.
  • Customize retry and rate-limit behavior.
  • Enable detailed logging of requests and responses.

You will need an Outscale account and API credentials. If you do not have one yet, please visit the Outscale website.


✅ Requirements

  • Python 3.10+
  • pip (Python package manager)
  • Access to the OUTSCALE API (valid access key / secret key or basic auth)
  • Network access to the Outscale API endpoints

⚙ Installation

Option 1: Install from PyPI

Install the pre-built Python package:

pip install osc-sdk-python

Option 2: Install from source

Clone the repository and build the package:

git clone https://github.com/outscale/osc-sdk-python.git
cd osc-sdk-python
make package

Then install the built wheel:

pip install dist/osc_sdk_python-0.42.0-py3-none-any.whl

🛠 Configuration

When you use the SDK, you can choose a profile. Profiles can be defined via environment variables or in a credentials file. Environment variables take precedence over files.

In the credentials file, you can set a default profile named default. It will be used if you do not explicitly specify a profile.

Environment variables

The SDK understands the following environment variables:

export OSC_PROFILE=<PROFILE>            # default: "default"

# or explicit credentials:
export OSC_ACCESS_KEY=<ACCESS_KEY>
export OSC_SECRET_KEY=<SECRET_KEY>

# optional:
export OSC_REGION=<REGION>              # default: eu-west-2
export OSC_MAX_RETRIES=<INT>            # default: 3
export OSC_RETRY_BACKOFF_FACTOR=<FLOAT> # default: 1.0
export OSC_RETRY_BACKOFF_JITTER=<FLOAT> # default: 3.0
export OSC_RETRY_BACKOFF_MAX=<FLOAT>    # default: 30

Credentials files

By default, the SDK looks for a JSON configuration file at ~/.osc/config.json.

Example:

{
  "default": {
    "access_key": "<ACCESS_KEY>",
    "secret_key": "<SECRET_KEY>",
    "region": "<REGION>"
  },
  "profile_1": {
    "access_key": "<ACCESS_KEY>",
    "secret_key": "<SECRET_KEY>",
    "region": "<REGION>"
  },
  "profile_2": {
    "access_key": "<ACCESS_KEY>",
    "secret_key": "<SECRET_KEY>",
    "region": "<REGION>"
  }
}

Notes:

  • Environment variables have priority over credentials files.

Basic Authentication

You can also use osc-sdk-python with basic authentication using your account email and password. Note that some API calls may be blocked with this method. See the authentication documentation for more details.

Example:

from osc_sdk_python import Gateway

with Gateway(email="your@email.com", password="yourAccountPassword") as gw:
    keys = gw.ReadAccessKeys()

Retry Options

The following options can be provided when initializing the Gateway to customize the retry behavior of the SDK:

  • max_retries (integer, default 3)
  • retry_backoff_factor (float, default 1.0)
  • retry_backoff_jitter (float, default 3.0)
  • retry_backoff_max (float, default 30)

These options follow the same behavior as their counterparts in urllib3.util.Retry, but are implemented by the SDK retry logic.

Example:

from osc_sdk_python import Gateway

gw = Gateway(
    max_retries=5,
    retry_backoff_factor=0.5,
    retry_backoff_jitter=1.0,
    retry_backoff_max=120,
)

Rate Limit Options

You can also configure rate limiting when initializing the Gateway:

  • limiter_max_requests (integer, default 5)
  • limiter_window (integer, default 1)

Example:

from osc_sdk_python import Gateway

gw = Gateway(
    limiter_max_requests=20,
    limiter_window=5,
)

More usage patterns and logging examples are documented in:


🧪 Examples

Some example topics covered in docs/examples.md:

  • Listing VMs and volumes
  • Using profiles and regions
  • Raw calls with gw.raw("ActionName", **params)
  • Enabling and reading logs

🧩 Known Issues & Troubleshooting

Common issues (such as UTF-8 / locale errors when reading the API spec) and their workarounds are documented in:


📜 License

Outscale Python SDK is released under the BSD-3-Clause.

© 2025 OUTSCALE SAS

See LICENSE for full details.


🤝 Contributing

We welcome contributions!

Please read our Contributing Guidelines and Code of Conduct before submitting a pull request.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osc_sdk_python-0.42.0.tar.gz (151.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

osc_sdk_python-0.42.0-py3-none-any.whl (120.1 kB view details)

Uploaded Python 3

File details

Details for the file osc_sdk_python-0.42.0.tar.gz.

File metadata

  • Download URL: osc_sdk_python-0.42.0.tar.gz
  • Upload date:
  • Size: 151.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for osc_sdk_python-0.42.0.tar.gz
Algorithm Hash digest
SHA256 65f729ff8a0a9016f0552ac7bad5d115310f42964d33c6d253792fe1ef028530
MD5 d2bdea2bd188390c9358c7566d03b862
BLAKE2b-256 2d3a9d7ada258bccd5fc3fffcf8e3e7967bc8c0875256985a6f2f7ac2e13efec

See more details on using hashes here.

File details

Details for the file osc_sdk_python-0.42.0-py3-none-any.whl.

File metadata

  • Download URL: osc_sdk_python-0.42.0-py3-none-any.whl
  • Upload date:
  • Size: 120.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for osc_sdk_python-0.42.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70176b5af143fab3ec2d43477bc3d8b49e574012ab651dd898d9d438b7af8a99
MD5 b9072c7afe918cd77bfb118da437c028
BLAKE2b-256 3fcb646b466d9ec09779c9ca808e3802dae26c066b7c0aa7f566f5a8174e4487

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.42.0 This release

2 files

0.41.0

2 files

0.40.0

2 files

0.39.2

2 files

0.38.1

2 files

0.38.0

2 files

0.37.0

2 files

0.36.0

2 files

0.35.0

2 files

0.34.0

2 files

0.33.0

2 files

0.32.0

2 files

0.31.0

2 files

0.30.1

2 files

0.30.0

2 files

0.29.0

2 files

0.28.0

2 files

0.27.0

2 files

0.26.0

2 files

0.25.0

2 files

0.24.0

2 files

0.23.0

2 files

0.22.0

2 files

0.21.1

2 files

0.21.0

2 files

0.20.0

2 files

0.19.0

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page