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")
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

acex_client-4.6.1.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

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

acex_client-4.6.1-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

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

Hashes for acex_client-4.6.1.tar.gz
Algorithm Hash digest
SHA256 76f23b573036edace4f76ffe9849403cfb14dc5fd7a446e8b82565b192991fc4
MD5 f0a03cd9b2ab80c3dd71188377a46e37
BLAKE2b-256 45635f4ae34dfcdedf6a828b8367f4f011a0ccb514394df975b3aed2003801ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for acex_client-4.6.1.tar.gz:

Publisher: ci.yml on acex-labs/acex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for acex_client-4.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd2e4854b9fdedc1b7ac5653f1ea10b76dea497a1448a42b9c2c020f532054a0
MD5 d1a3d66844d00f680e164cfdb2389909
BLAKE2b-256 8755a0ef5f78a49cf8b19ece1c0ddd544761cd2e3678a53d463f0d1e922705ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for acex_client-4.6.1-py3-none-any.whl:

Publisher: ci.yml on acex-labs/acex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

4.7.0

2 files

4.6.2

2 files

This release

4.6.1 This release

2 files

4.6.0

2 files

4.5.0

2 files

4.4.0

2 files

4.3.0

2 files

4.2.2

2 files

4.2.1

2 files

4.2.0

2 files

4.1.2

2 files

4.1.1

2 files

4.1.0

2 files

0.0.10

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.4

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