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.1
pip install praxicraft-shared==0.7.1

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.1

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.1
File Size Uploaded
praxicraft_shared-0.7.1.tar.gz 64.8 kB Details

Built distribution (wheel)

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

Total release size: 186.7 kB

Release files / praxicraft_shared-0.7.1.tar.gz

Download URL praxicraft_shared-0.7.1.tar.gz
Size 64.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8ffe6fc5f210e2aa1121989dfa5d7c48266a5e31fff34f7a938ffe03bf76622f
BLAKE2b-256 checksum
How to use checksums
fd9437c501ee4d6d63fdd299bd776d423ae88dc62a3add78f1173b742193c189
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.1-py3-none-any.whl

Download URL praxicraft_shared-0.7.1-py3-none-any.whl
Size 121.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9a5e24f6a168a87025de6990c573122391ac201ecc105900112fcf13f285862
BLAKE2b-256 checksum
How to use checksums
7d048939d18843291e9d45a2ae35675d2c3034ef030f5a88cafc13f2812fa052
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

0.7.2

2 release files

This release

0.7.1 This release

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