Skip to main content

godaix

godaix 2.0 is a zero-infrastructure resilience runtime for Python. Its five small libraries provide call-level resilience, host-local shared state, integrations, operational events, and source-safety checks. It has no required runtime dependencies; the native Rust/C++ core is included in wheels, with Python implementations available as a fallback.

Install

python -m pip install godaix

Optional integration groups are available as extras: http, httpx, openai, anthropic, fastapi, celery, and prometheus.

Quick start

from godaix.nexus import Counter, TokenBucket
from godaix.aix import redact, threadcheck

counter = Counter()
print(counter.increment())  # 1, visible to other processes sharing this object
counter.cleanup()            # call after all worker processes have exited

print(redact("email=dev@example.com api_key=sk-example-secret"))
# email=[REDACTED_EMAIL] api_key=[REDACTED]

hazards = threadcheck("""
cache = {}
def get(key):
    if key not in cache:
        cache[key] = load(key)
""")
print(hazards)

bucket = TokenBucket(capacity=10, refill_rate=2.0)
print(bucket.consume())

Counter, TokenBucket, and Breaker use the native shared-memory segment when the extension is available. They use process-safe Python primitives when it is not. Pass the object to spawned workers using multiprocessing; native objects share their named segment across processes. Call each native object's cleanup() after all workers finish to unlink its segment.

The five libraries

aura — call resilience

resilient, retry, circuit_breaker, rate_limit, bulkhead, timeout, deadline, fallback, dedupe, llm_retry

nexus — state primitives

SharedState, Breaker, TokenBucket, SlidingWindow, Semaphore, Counter, Registry, snapshot, cleanup_dead, selftest

aether — integrations

install, uninstall, patched, patch_requests, patch_httpx, patch_openai, patch_anthropic, fastapi_middleware, celery_plugin, from_env

apex — events and operations

events.subscribe, history, explain, status_json, prometheus_exporter, logging_handler, top, tail, report_html, healthcheck_endpoint

aix — safety and testing

redact, secret_scan, security_scan, chaos, fault_injection, fake_clock, godaix_state, load_test, doctor, threadcheck

Native core

The extension is built with maturin from the repository root:

python -m pip install maturin
maturin build --release --compatibility pypi

The Python package lives in src/godaix, the PyO3 crate in native/rust, and the C++17 POSIX shared-memory implementation in native/cpp. The segment has an explicit versioned layout, lock-free atomic counter, shared token-bucket and breaker state, process-ID lock leases, and recovery when a lease owner exits unexpectedly. Rust provides the PyO3 API, event ring buffer, credential redaction, and tree-sitter Python hazard scanner.

Validation and benchmark

python scripts/check_features.py
python -m pytest
python benchmarks/bench_shared_state.py

The feature checker runs the native-core behavior tests and reports native only when the extension imports successfully; otherwise it reports fallback. The benchmark compares the same spawn-process increment workload using a file protected by fcntl.flock, the Python multiprocessing.Value fallback, and the native shared-memory counter. Each run validates the final count before reporting timing.

Documentation

Open index.html for library reference cards, runnable usage examples, and before/after behavior demos. Standalone sample applications are in projects/.

License

MIT. See LICENSE.

Metadata

Release files for godaix 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for godaix 2.0.0
File Size Uploaded Provenance
godaix-2.0.0.tar.gz 42.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for godaix 2.0.0
File Interpreter ABI Platform
godaix-2.0.0-cp310-abi3-manylinux_2_34_x86_64.whl CPython 3.10 abi3 Linux glibc 2.34+ x86-64 Details

Total release size: 1.2 MB

Release files / godaix-2.0.0.tar.gz

Download URL godaix-2.0.0.tar.gz
Size 42.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bf24fd08a7e519b0e7ac3449bf64f9176be16cce260a321ae86598d0a6b68b6b
BLAKE2b-256 checksum
How to use checksums
d8d0a803ed16fda730e50d6adec70bf0a070f36998ca8549a9dbbe5aa803c646
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / godaix-2.0.0-cp310-abi3-manylinux_2_34_x86_64.whl

Download URL godaix-2.0.0-cp310-abi3-manylinux_2_34_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
b9d106aa714c3055bdb50647a3756cd16017c476b6455cbdd98cad65007b02f3
BLAKE2b-256 checksum
How to use checksums
ba0a2894f45b5c5d4ebbb53cca689baf2db726a34e883e46b2a88736679bff3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for godaix 2.0.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page