A clean, typed, reusable Python connector for the Exoscale APIv2 — no CLI tool required.
Project description
exoscale-connector
A clean, typed, reusable Python connector for the Exoscale APIv2. It talks to
the HTTP API directly — no exo CLI and no Ansible required — so it can be
dropped into any project that needs to read or manage Exoscale resources
programmatically.
- Typed — every request/response is a pydantic v2 model, so you get validation and editor autocompletion.
- One module per asset type —
security-group,instance,elastic-ip,dns,dbaas,sks, … each with a small, uniform client. - Library + CLI — import it, or use the per-asset command-line tools
(also namespaced under one
exoscale-connectorbinary, with--output table). - Built for automation — idempotent
ensure()(get-or-create by name),wait_for_statepolling, and label-filtered listing make provisioning scripts re-runnable by construction. - Self-contained — runtime deps are just
requests+pydantic; copy the package into another repo and it keeps working. - Secret-safe — credentials come only from the environment; nothing is
hardcoded or read from disk, and credentials are masked in
repr()/log output.
Relationship to the official Exoscale SDK
Exoscale publishes an official, actively maintained Python SDK —
python-exoscale (the exoscale
package on PyPI); if you want the vendor-supported, batteries-included bindings,
use that. This connector is a smaller, opinionated alternative built for one
goal — a drop-in, IaC-ready APIv2 client that is as easy to use as possible:
where the official SDK splits into a high-level interface that grew up around the
now-retired APIv1 and a lower-level, OpenAPI-generated exoscale.api.v2.Client,
this project gives every asset type the same uniform, pydantic-typed client
plus a matching per-asset CLI, talks only to APIv2, reads credentials only from
the environment, polls async operations to completion, backs every asset type
with a live test that has run end-to-end against a real account, depends on just
requests + pydantic, and can be vendored by copying one folder.
Install
pip install -e ".[dev]" # from this folder, for development
# or, once published / vendored:
pip install exoscale-connector
Object Storage (S3-compatible) support pulls in boto3:
pip install "exoscale-connector[sos]"
Quickstart (library)
from exoscale_connector import ExoscaleClient
from exoscale_connector.resources.security_group import (
SecurityGroupClient, SecurityGroupRule,
)
# Credentials from EXOSCALE_API_KEY / EXOSCALE_API_SECRET in the environment.
client = ExoscaleClient.from_env(zone="de-fra-1")
sg = SecurityGroupClient(client)
for group in sg.list():
print(group.id, group.name)
group = sg.create({"name": "web", "description": "public web tier"})
sg.add_rule(group.id, SecurityGroupRule(
flow_direction="ingress", protocol="tcp",
start_port=443, end_port=443, network="0.0.0.0/0",
))
Quickstart (CLI)
export EXOSCALE_API_KEY=... EXOSCALE_API_SECRET=... EXOSCALE_ZONE=de-fra-1
exoscale-security-group list
exoscale-security-group get --id <uuid>
exoscale-security-group create --json '{"name": "web"}'
exoscale-security-group delete --id <uuid>
In practice, inject the credentials with your secret-management tooling rather than exporting them by hand. The connector only reads environment variables, so any injector works (HashiCorp Vault, Infisical, Doppler, …), e.g.
<vault-cli> run -- exoscale-security-group list.
Documentation
- User / operator guide — installing, authenticating, zones, and the common commands shared by every asset type.
- Asset type reference — one page per asset type with model schema, CLI subcommands, library snippets, gotchas, and a runnable end-to-end example backed by a passing live test.
- IAM policy cookbook — helper constructors and copy-paste recipes for IAM role policies (the one area with real depth).
- Developer guide — architecture, how to add a new asset type, and the testing strategy.
- Live test plan — tiered per-asset live-test design (safety rails, naming prefix, cleanup invariants, cost model).
- Live test results — run log of every live test executed against a real Exoscale tenant, plus the bugs each tier surfaced and how they were fixed.
Every asset type the connector supports has a live test that has actually run end-to-end against a real account; the gotchas in the asset-type pages are empirical, not theoretical.
Maintenance & support
This is a personal project, maintained on a best-effort, occasional basis — not full-time and not on a fixed schedule. It's shared because it may be useful to others, not as a supported product. Issues and pull requests are welcome and will be looked at when time allows, but there is no guaranteed response time or release cadence. The API surface it tracks can drift; if you depend on it, pin a version and don't hesitate to fork and adapt it — that's encouraged.
License
Released under the MIT License — free to use, modify, and redistribute, including commercially. Provided as-is, without warranty of any kind; use entirely at your own risk. The only condition is that the copyright and permission notice are kept in copies.
Project details
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 exoscale_connector-0.2.0.tar.gz.
File metadata
- Download URL: exoscale_connector-0.2.0.tar.gz
- Upload date:
- Size: 227.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02955525abf222b8947772894aa52be3c6dcc37bb7d9fbfd32fddab4b0c4c3fb
|
|
| MD5 |
11624b46a8ed5b7aaa7d55afa3477fad
|
|
| BLAKE2b-256 |
be79f6a1615f6379da67a3d9b9e0a35c1814215fe9b7aec859b4083cdf541667
|
Provenance
The following attestation bundles were made for exoscale_connector-0.2.0.tar.gz:
Publisher:
release.yml on ralle-lang/exoscale-python-connector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exoscale_connector-0.2.0.tar.gz -
Subject digest:
02955525abf222b8947772894aa52be3c6dcc37bb7d9fbfd32fddab4b0c4c3fb - Sigstore transparency entry: 1789330610
- Sigstore integration time:
-
Permalink:
ralle-lang/exoscale-python-connector@49967b5ea06e6aa48cbc81fcc04183e6d9e4e859 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ralle-lang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@49967b5ea06e6aa48cbc81fcc04183e6d9e4e859 -
Trigger Event:
push
-
Statement type:
File details
Details for the file exoscale_connector-0.2.0-py3-none-any.whl.
File metadata
- Download URL: exoscale_connector-0.2.0-py3-none-any.whl
- Upload date:
- Size: 80.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9beb62e49520e093b60245f9fb762015a8034df3b3bd4f03783c52ccdfb2640
|
|
| MD5 |
3a1500b873f66c0d63b86cea330a2cc1
|
|
| BLAKE2b-256 |
5bec1d4d63d4ad6db22fd30d08b54ad8054ba5c4f7eb78dd7c8cd7c40569d709
|
Provenance
The following attestation bundles were made for exoscale_connector-0.2.0-py3-none-any.whl:
Publisher:
release.yml on ralle-lang/exoscale-python-connector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
exoscale_connector-0.2.0-py3-none-any.whl -
Subject digest:
e9beb62e49520e093b60245f9fb762015a8034df3b3bd4f03783c52ccdfb2640 - Sigstore transparency entry: 1789330646
- Sigstore integration time:
-
Permalink:
ralle-lang/exoscale-python-connector@49967b5ea06e6aa48cbc81fcc04183e6d9e4e859 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/ralle-lang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@49967b5ea06e6aa48cbc81fcc04183e6d9e4e859 -
Trigger Event:
push
-
Statement type: