Skip to main content

praxicraft-shared

Stateless Python utilities shared by Praxicraft backends (Practice, auth, notifications, billing, and future services). Products pin a PyPI version; no Django ORM, settings, or product business logic lives here.

Planning & milestones: Gamified-Application/docs/praxicraft-shared/README.md

Prerequisites

  • Python 3.11+

Install (in a product)

Published on PyPI:

praxicraft-shared==0.7.2
pip install praxicraft-shared==0.7.2

Docker / CI need no GitHub token for this package — 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

Release

  1. Bump version in pyproject.toml and __version__ in src/praxicraft_shared/__init__.py.
  2. Merge to main, tag vX.Y.Z, push the tag (or run Publish → workflow_dispatch with that tag).
  3. GitHub Actions publishes to PyPI via Trusted Publishing and creates a GitHub Release.

What’s in the package

Module Role
jwt_utils Validate RS256 access JWTs (JWKS / PEM)
auth_client HTTP client for praxicraft-auth (token exchange, me, …)
org_client HTTP client for the auth organisation directory (org, membership, role, teams)
billing_client HTTP client for praxicraft-billing (entitlements, checkout, cancel/resume)
s3_client Injectable MinIO/S3 helpers (make_s3_client, put/get/presign, prefix download)
notifications_client HTTP client for praxicraft-notifications (send, events, prefs, push, inbox)
service_token Parse product:token / JSON service-token maps (no DRF)
ai_service Thin client for praxicraft-llm (gateway + circuit-breaker fallback)
error_envelope Standard success/error dict shapes
events Event envelope helpers + events/SCHEMA.md
email/ Shared HTML/text email templates (rendered by notifications)
secret_crypto Fernet encrypt/decrypt (inject key)
work_email Email normalize / consumer-domain helpers
hibp Have I Been Pwned password check

org_client ships ahead of the auth A7 cutover: directory reads hit /api/v1/internal/orgs/…, and list helpers return [] while an endpoint is not deployed yet, so products can pin 0.7.0 before auth exposes the API.

Hard rules

  1. Stateless — no Django models, ORM, Celery, or package-owned Redis singletons
  2. No django.conf.settings — callers inject URLs and keys
  3. No product logic (XP, Assess scoring, Tutor mastery)
  4. Semver via git tags + PyPI — breaking JWT/auth contracts = major bump

Release files for praxicraft-shared 0.7.2

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

Source distribution (sdist)

Source distribution for praxicraft-shared 0.7.2
File Size Uploaded
praxicraft_shared-0.7.2.tar.gz 65.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for praxicraft-shared 0.7.2
File Interpreter ABI Platform
praxicraft_shared-0.7.2-py3-none-any.whl Python 3 none any Details

Total release size: 188.9 kB

Release files / praxicraft_shared-0.7.2.tar.gz

Download URL praxicraft_shared-0.7.2.tar.gz
Size 65.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b9f8b8ef63156556cc78cd64a7ac3584bf2604057282a1b07c9c226311c27f39
BLAKE2b-256 checksum
How to use checksums
da1aa472725e08acb2913aa830116c826381f628658ea5fa1e308626e87b4205
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / praxicraft_shared-0.7.2-py3-none-any.whl

Download URL praxicraft_shared-0.7.2-py3-none-any.whl
Size 123.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b4426fca54d9c73ef42a5e17d77de5782fc00d9947e782a1986930b50eb3d85
BLAKE2b-256 checksum
How to use checksums
93890793210f072e5f8c69cf635ae0ab0963b588a39a42d042ae34cbcb308c6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.2 This release

2 release files

0.7.1

2 release files

0.6.0

2 release files

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