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.2.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.2-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file acex_client-4.6.2.tar.gz.

File metadata

  • Download URL: acex_client-4.6.2.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.2.tar.gz
Algorithm Hash digest
SHA256 e03b3a10ae0b864aede76d0f05a2157eed0f662e397710990d7cb71190521a59
MD5 a0eafa2b945e3ebc90ce6eaa83db3f94
BLAKE2b-256 5cac219a59db66b8c0cd69e4c9380d1cbf3e90d0aed7e333d66ec3ef2cfe9e0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for acex_client-4.6.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: acex_client-4.6.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 11945410495e3646ddf072f9a6895e5a8b75df26f497429b3bf230de35614bc9
MD5 f4f05b92aeefe866b1bdf1b6af54ec8e
BLAKE2b-256 4de09235f2aac0efc33c87186d46d2a02ebc81bb7c61aaab2d3919c2c5dfc039

See more details on using hashes here.

Provenance

The following attestation bundles were made for acex_client-4.6.2-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

This release

4.6.2 This release

2 files

4.6.1

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