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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
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 accx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: accx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a986171843b41a2f138ef674ecfc276d535e2e0c060a5fb38704f683e85d2ce3
|
|
| MD5 |
f87b1c2a466fdf0f921dd1e2645d7f55
|
|
| BLAKE2b-256 |
26ede6b7dea9e703dd9111d6ab4b0065f27d96aa29d67248d7f7eecf8b72f26d
|