Skip to main content

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 URL
  • ACEX_ISSUER_URL, ACEX_CLIENT_ID, ACEX_CLIENT_SECRET — OIDC override
  • ACEX_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")

Via a LiveInstance, the bound sub-resource is exposed as an attribute:

agent = client.observability.agents.get(1)
agent.rules.create(region="eu")

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.

Release files for acex-client 4.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for acex-client 4.9.0
File Size Uploaded
acex_client-4.9.0.tar.gz 20.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for acex-client 4.9.0
File Interpreter ABI Platform
acex_client-4.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 54.1 kB

Release files / acex_client-4.9.0.tar.gz

Download URL acex_client-4.9.0.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
93de02456d08d7d0a3cfa28931501b1a0dd22587894c4d223d5ef8b22bf54cf5
BLAKE2b-256 checksum
How to use checksums
188380498383148b795d52f3853b5541e363ab12c7b01af99318c727e0e7111b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / acex_client-4.9.0-py3-none-any.whl

Download URL acex_client-4.9.0-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b4efb31da709c53ee279f10b0bb07da59dda53a86400aa5ea3409b9e437511c
BLAKE2b-256 checksum
How to use checksums
7a79d5eb3d110a09586f3c3062e55e0ae031c9552ab1aaeaf69567deeec18673
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.9.0 This release

2 release files

4.8.3

2 release files

4.8.2

2 release files

4.8.1

2 release files

4.8.0

2 release files

4.7.0

2 release files

4.6.2

2 release files

4.6.1

2 release files

4.6.0

2 release files

4.5.0

2 release files

4.4.0

2 release files

4.3.0

2 release files

4.2.2

2 release files

4.2.1

2 release files

4.2.0

2 release files

4.1.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

0.0.10

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page