BA Kit
bakit dependency installation for local development and testing
uv sync --all-extras --dev
Optional Tortoise ORM runtime
Bakit initializes Tortoise ORM when a service defines a TORTOISE_ORM setting.
Services that do not use Tortoise can omit that setting; Bakit's Sanic app, ARQ
worker, CLI commands, and interactive shell will then run without initializing
Tortoise. Existing services with a TORTOISE_ORM setting keep the default behavior.
Optional Clerk authentication
Install the Sanic and Clerk extras:
pip install "balabs-kit[sanic,clerk]"
Set CLERK_ISSUER (e.g. https://your-app.clerk.accounts.dev, or your
production Clerk domain). Optionally set CLERK_AUDIENCE to enforce aud,
CLERK_AUTHORIZED_PARTIES to a comma-separated list of trusted browser
origins for azp, and CLERK_JWKS_URL to override only the key endpoint.
Then mark any view with @clerk_auth to require a valid Clerk session
token (Authorization: Bearer <token> or the __session cookie):
from bakit.sanic.decorators import clerk_auth
from bakit.sanic.views import APIView, Response, route
@route(bp, "/me/")
@clerk_auth
class MeView(APIView):
async def get(self, request):
return Response({"user_id": request.ctx.auth_claims["sub"]})
Unmarked views are unaffected. Marked views return 401 without a valid
token and are automatically excluded from the cache middleware (an
authenticated response must never be shared between users). On success the
token claims are on request.ctx.auth_claims.
Metadata
Release files for balabs-kit 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| balabs_kit-0.10.0.tar.gz | 24.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| balabs_kit-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.4 kB
Release files / balabs_kit-0.10.0.tar.gz
| Download URL | balabs_kit-0.10.0.tar.gz |
|---|---|
| Size | 24.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
941542c920f4373ae67e3d0a873c1e43e00be30071e1b3e810d0afff75d03a86
|
|
BLAKE2b-256 checksum How to use checksums |
400fdbb9b84b847ab5da90e2baa2921fda971c6de910ebc0e16a20b965d59746
|
| 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 17, 2026.
Transparency logRelease files / balabs_kit-0.10.0-py3-none-any.whl
| Download URL | balabs_kit-0.10.0-py3-none-any.whl |
|---|---|
| Size | 29.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3b47cdbe40c796d6002cae9ee764cf418bea16076d08d656d18611b9f72e61e
|
|
BLAKE2b-256 checksum How to use checksums |
5eb3e9af27be0e04ee35a2fc317f76154f91e776c0fdacc3853f2198ccfccb02
|
| 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 17, 2026.
Transparency log