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.
Environment variables with EnvLoader
Store the ACCX reference in your .env value and expand it at boot with a personal access token:
GEMINI_KEY=accx://acme/production:GEMINI_KEY
DB_HOST=accx://acme/production:DB_HOST
LOCAL_DEV_FLAG=off
from accx import EnvLoader
loader = EnvLoader(
base_url=os.environ["ACCX_BASE_URL"],
personal_token=os.environ["ACCX_PERSONAL_TOKEN"], # accx_pat_...
)
env = loader.load(
local=os.environ, # explicit local values win
accx=Path(".env").read_text(),
)
accx://<project>/<environment>:<KEY> is resolved server-side only for the token's own workspace; development, staging, and production are the only environments. Resolution is batched per environment, and keys missing on the server raise AccxError with status 404.
Metadata
Release files for accx 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| accx-0.4.0.tar.gz | 17.2 kB | Without provenance | Details for accx-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| accx-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for accx-0.4.0-py3-none-any.whl |
Total release size: 37.1 kB
Release files / accx-0.4.0.tar.gz
| Download URL | accx-0.4.0.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a89946d9bf7932c363091ac42ae6d49bcd4aaa8a7ba074b43520a5fa49fc0902
|
|
BLAKE2b-256 checksum How to use checksums |
b3014aafc0355a0e617566650fa3fdf61b43d90141729e6aa7b64d98a18cfca4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / accx-0.4.0-py3-none-any.whl
| Download URL | accx-0.4.0-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13020759ba3d2f134e37e1e6cdfc2d80cb9019bcf6f49862e08a1a2f1a080fa9
|
|
BLAKE2b-256 checksum How to use checksums |
a8cc5981c3e665f8ef4b4620060c7c3b9d7fa464e95953d1152ab254f2450ffa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for accx 0.4.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.