praxicraft-shared
Stateless Python utilities shared by Praxicraft backends (Practice, auth, notifications, billing, support, Tutor, LLM clients). Products pin a PyPI version. No Django ORM, settings, or product business logic lives here.
| PyPI | https://pypi.org/project/praxicraft-shared/ |
| Current version | 0.9.0 (see pyproject.toml) |
| Python | 3.11+ |
Contents
- About
- Install in a product
- Local development
- What’s in the package
- Release
- Docs and deeper integrations
About
Hard rules:
- Stateless — no Django models, ORM, Celery, or package-owned Redis singletons
- No
django.conf.settings— callers inject URLs and keys - No product logic (XP, Assess scoring, Tutor mastery)
- Semver via git tags + PyPI — breaking JWT/auth contracts = major bump
Planning history: Practice shared docs.
Install in a product
Published on PyPI:
pip install praxicraft-shared==0.9.0
Docker / CI need no GitHub token — public index only.
Local editable (sibling checkout):
pip install -e ~/Desktop/praxicraft-shared
Local development
cd ~/Desktop/praxicraft-shared
pip install -e ".[dev]"
ruff check src tests
pytest
What’s in the package
| Module | Role |
|---|---|
jwt_utils |
Validate RS256 access JWTs (JWKS / PEM) |
auth_client |
HTTP client for praxicraft-auth |
org_client |
Auth organisation directory |
billing_client |
Entitlements, checkout, cancel/resume |
notifications_client |
Send, events, prefs, push, inbox |
support_client |
Support tickets API |
ai_service |
Thin client for praxicraft-llm (chat, streaming, tools, get_speech_audio) |
exec |
bureau-exec v1 and v2: get_languages, build_job, build_v1_job (SQL, Linux, platform cases, Python test harness), enqueue_job, await_result (sync and async), one ExecResult for both, package installs (mode="prepare", then deps= on runs), summarize_tests scoring, the wire contract (exec.contract) and an in memory executor for tests (exec.testing) |
s3_client |
Injectable MinIO/S3 helpers |
service_token |
Parse product:token / JSON maps |
error_envelope |
Standard success/error shapes |
events |
Event envelope helpers |
email/ |
Shared HTML/text email templates (rendered by notifications) |
secret_crypto |
Fernet encrypt/decrypt (inject key) |
work_email / hibp |
Email helpers / HIBP check |
Release
- Bump
versioninpyproject.tomland__version__insrc/praxicraft_shared/__init__.py. - Merge to
main. - Tag
vX.Y.Zand push the tag (triggers Publish), or Actions → Publish → Run workflow with that existing tag. - GitHub Actions publishes to PyPI via Trusted Publishing and creates a GitHub Release.
Pushing main alone runs CI only — it does not publish to PyPI until a v* tag exists.
Docs and deeper integrations
| Link | Topic |
|---|---|
| notifications PRODUCT-INTEGRATION | How products call notifications_client |
| support PRODUCT-INTEGRATION | How products call support_client |
| auth README | Application registry + JWT |
| billing README | Entitlements client |
| Tutor README | End-to-end product wiring |
| praxicraft-llm | Gateway tokens for ai_service |
Metadata
Release files for praxicraft-shared 0.12.1
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 |
|---|---|---|---|---|
| praxicraft_shared-0.12.1.tar.gz | 90.8 kB | With provenance | Details for praxicraft_shared-0.12.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| praxicraft_shared-0.12.1-py3-none-any.whl | Python 3 | none | any | Details for praxicraft_shared-0.12.1-py3-none-any.whl |
Total release size: 236.9 kB
Security for praxicraft-shared 0.12.1
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.
Full provenance
Both files in this release have been 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.