Skip to main content

praxicraft-shared

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

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

Prerequisites

  • Python 3.11+
  • GitHub access to this private repo (install via HTTPS + token)

Install (in a product)

praxicraft-shared @ git+https://github.com/praxicraft-platform/praxicraft-shared@v0.6.0

Builds need a token with contents:read (CI: PRAXICRAFT_GH_TOKEN).

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 (token exchange, me, …)
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 internal send
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

Not shipped yet (planned): org_client (after auth A7).

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 — breaking JWT/auth contracts = major bump

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

praxicraft_shared-0.6.0.tar.gz (58.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

praxicraft_shared-0.6.0-py3-none-any.whl (115.7 kB view details)

Uploaded Python 3

File details

Details for the file praxicraft_shared-0.6.0.tar.gz.

File metadata

  • Download URL: praxicraft_shared-0.6.0.tar.gz
  • Upload date:
  • Size: 58.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for praxicraft_shared-0.6.0.tar.gz
Algorithm Hash digest
SHA256 a1d08b8cdcfa535650baa78729ea31f56366487642519114e9a9bf0e1584a56f
MD5 b119349ffebf0120b85f9d61339fe505
BLAKE2b-256 6e604e4956e6113abc81699c45d9951eaec71146b5b338dd86d6a287fd9bd896

See more details on using hashes here.

Provenance

The following attestation bundles were made for praxicraft_shared-0.6.0.tar.gz:

Publisher: publish.yml on praxicraft-platform/praxicraft-shared

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file praxicraft_shared-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for praxicraft_shared-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2967be2207ff328666e35bece7cad8294fa85fded330dd73f1f6dd13c1a11db
MD5 7c2ba07a77f3727d89e0df55eefa84a8
BLAKE2b-256 b0f2e69a40973c5948fb2ec046add51b3c4f05ec4cc469f94e7a330478168ae8

See more details on using hashes here.

Provenance

The following attestation bundles were made for praxicraft_shared-0.6.0-py3-none-any.whl:

Publisher: publish.yml on praxicraft-platform/praxicraft-shared

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.7.2

2 files

0.7.1

2 files

This release

0.6.0 This release

2 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