ACCX Python SDK
Install with pip install accx after publishing this package.
from accx import AccxClient, JobSubmission
client = AccxClient(base_url=os.environ["ACCX_BASE_URL"], workload_token=os.environ["ACCX_WORKLOAD_TOKEN"])
result = client.submit_action(JobSubmission(
action="provider.publish",
secret_references=[os.environ["SOCIAL_TWITTER_REF"]],
required_scopes=["job.execute", "provider.publish"],
input={"contentId": "post-123"},
idempotency_key=str(uuid.uuid4()),
))
Only stable references and sanitized job results cross the SDK boundary.
Metadata, async, and error handling
get_secret_metadata(reference) returns rotation and health metadata only. It never returns a credential value. AsyncAccxClient provides the same reference-only methods for async services, and AccxError exposes a safe status code plus a retryable flag for transient failures.
from accx import AsyncAccxClient, redact
client = AsyncAccxClient(
base_url=os.environ["ACCX_BASE_URL"],
workload_token=os.environ["ACCX_WORKLOAD_TOKEN"],
)
metadata = await client.get_secret_metadata(os.environ["SOCIAL_TWITTER_REF"])
safe_context = redact({"reference": metadata.reference, "token": "never log this"})
For a FastAPI service, fastapi_client_dependency() returns a dependency callable without importing FastAPI or adding a browser-facing integration. It constructs the client only from server process variables ACCX_BASE_URL and ACCX_WORKLOAD_TOKEN.
Metadata
Release files for accx 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| accx-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / accx-0.1.1-py3-none-any.whl
| Download URL | accx-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9771057bfdac151822880900f32ca53d7d86822bfb2481e121952851c958c333
|
|
BLAKE2b-256 checksum How to use checksums |
a204530ea77ad1f4d0014360261929b489bcc18238a9220197e6459678fd6db2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|