ACE-X Client
Synchronous Python client for the ACE-X backend.
Installation
pip install acex-client
Quick start
from acex_client import Acex
with Acex(base_url="https://acex.local") as client:
result = client.inventory.sites.query(name="stockholm")
for site in result:
print(site.id, site.name)
Auth is auto-detected from /auth/config. Override via env vars:
ACEX_BASE_URL— backend URLACEX_ISSUER_URL,ACEX_CLIENT_ID,ACEX_CLIENT_SECRET— OIDC overrideACEX_VERIFY_SSL=false— disable TLS verification
or inject an AuthProvider directly:
from acex_client.auth import ClientCredentialsAuth
auth = ClientCredentialsAuth(client_id="...", client_secret="...", issuer_url="...", verify_ssl=True)
with Acex(base_url="...", auth=auth) as client:
...
Namespaces
| Namespace | Resources / actions |
|---|---|
client.inventory |
sites, regions, region_assignments, contacts, contact_assignments, assets, asset_clusters, collection_agents, credentials, logical_nodes, management_connections, node_instances, node_credentials(node_id), site_credentials(site_name) |
client.observability |
agents (with bound outputs, rules, nodes), grafana |
client.operations |
compliance (.check(), .site()), config_history.list_changes(), lldp (.upload(), .topology(), .by_site(), .get(), .reverse()) |
client.config_components |
catalog(), generate(), reconcile(), drivers(), translate() |
client.neds |
list(), get(), download() |
client.ai |
ask(), analyze() (SSE-streamed) — None if backend has no ai_ops mounted |
client.system |
auth_config(), health_node(), health_site() |
CRUD pattern
Each resource inherits the mixins for the verbs it supports. All mutations
return a LiveInstance proxy that holds the Pydantic model; .save() diffs
against the original and PATCHes only changed fields, .delete() removes
the resource:
site = client.inventory.sites.create(name="stockholm", city="SE")
site.display_name = "Stockholm HQ"
site.save() # PATCH /inventory/sites/{id} with {display_name: ...}
site.delete() # DELETE /inventory/sites/{id}
get, update, create, delete all raise AcexNotFoundError on HTTP 404
rather than returning None — wrap in try/except for "if exists" flows.
Actions and sub-resources
Action methods use @action(method, path_template):
client.inventory.collection_agents.manifest(id=1)
client.inventory.collection_agents.ack(id=1, payload=CollectionAgentAck(config_revision=5))
Bound sub-resources are accessed via .parent_or_id:
client.inventory.collection_agents.rules(1).create(region="eu")
client.observability.agents.outputs(agent_id).list()
Via a LiveInstance, the bound sub-resource is exposed as an attribute:
agent = client.observability.agents.get(1)
agent.outputs.create(influxdb_version="v2", url="http://influx:8086")
Errors
from acex_client import (
AcexNotFoundError,
AcexValidationError,
AcexAuthError,
AcexPermissionError,
AcexServerError,
AcexTimeoutError,
AcexConnectionError,
)
All errors inherit from AcexError. HTTP errors carry status_code and
body attributes.
Examples
See examples/crud.py and examples/observe.py.
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 acex_client-4.6.1.tar.gz.
File metadata
- Download URL: acex_client-4.6.1.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76f23b573036edace4f76ffe9849403cfb14dc5fd7a446e8b82565b192991fc4
|
|
| MD5 |
f0a03cd9b2ab80c3dd71188377a46e37
|
|
| BLAKE2b-256 |
45635f4ae34dfcdedf6a828b8367f4f011a0ccb514394df975b3aed2003801ca
|
Provenance
The following attestation bundles were made for acex_client-4.6.1.tar.gz:
Publisher:
ci.yml on acex-labs/acex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acex_client-4.6.1.tar.gz -
Subject digest:
76f23b573036edace4f76ffe9849403cfb14dc5fd7a446e8b82565b192991fc4 - Sigstore transparency entry: 2451038395
- Sigstore integration time:
-
Permalink:
acex-labs/acex@cd2b3ecf14cbc49e22ed24d92ff64b77792f2b02 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/acex-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@cd2b3ecf14cbc49e22ed24d92ff64b77792f2b02 -
Trigger Event:
push
-
Statement type:
File details
Details for the file acex_client-4.6.1-py3-none-any.whl.
File metadata
- Download URL: acex_client-4.6.1-py3-none-any.whl
- Upload date:
- Size: 31.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd2e4854b9fdedc1b7ac5653f1ea10b76dea497a1448a42b9c2c020f532054a0
|
|
| MD5 |
d1a3d66844d00f680e164cfdb2389909
|
|
| BLAKE2b-256 |
8755a0ef5f78a49cf8b19ece1c0ddd544761cd2e3678a53d463f0d1e922705ec
|
Provenance
The following attestation bundles were made for acex_client-4.6.1-py3-none-any.whl:
Publisher:
ci.yml on acex-labs/acex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
acex_client-4.6.1-py3-none-any.whl -
Subject digest:
fd2e4854b9fdedc1b7ac5653f1ea10b76dea497a1448a42b9c2c020f532054a0 - Sigstore transparency entry: 2451038517
- Sigstore integration time:
-
Permalink:
acex-labs/acex@cd2b3ecf14cbc49e22ed24d92ff64b77792f2b02 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/acex-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@cd2b3ecf14cbc49e22ed24d92ff64b77792f2b02 -
Trigger Event:
push
-
Statement type: