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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file balabs_kit-0.9.1.tar.gz.
File metadata
- Download URL: balabs_kit-0.9.1.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1507cdfdbcdc4052a4a9bca9e9e5f6ba484e72967407db64be2d15ff586f1354
|
|
| MD5 |
d553f37aed0671117bc94bb15a347f64
|
|
| BLAKE2b-256 |
595a52217f5e22601e39e9c70fde7a32b55be31dd3622e831fa488fe514dcfe0
|
Provenance
The following attestation bundles were made for balabs_kit-0.9.1.tar.gz:
Publisher:
publish.yml on blockanalitica/bakit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
balabs_kit-0.9.1.tar.gz -
Subject digest:
1507cdfdbcdc4052a4a9bca9e9e5f6ba484e72967407db64be2d15ff586f1354 - Sigstore transparency entry: 2776934022
- Sigstore integration time:
-
Permalink:
blockanalitica/bakit@d8951ba11f3e1a11a65662905b3f1adb099bbd9f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/blockanalitica
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d8951ba11f3e1a11a65662905b3f1adb099bbd9f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file balabs_kit-0.9.1-py3-none-any.whl.
File metadata
- Download URL: balabs_kit-0.9.1-py3-none-any.whl
- Upload date:
- Size: 29.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36cbbd838bc83af7ba5e23137e3697f54a84fef1ca75714a94657f84582c2f52
|
|
| MD5 |
632ad1d3988d2b317e07df93a4cb854b
|
|
| BLAKE2b-256 |
aa42d2157ad69d2199604b2a13ead48a6d6e096921a71027e27069881d4bb6b0
|
Provenance
The following attestation bundles were made for balabs_kit-0.9.1-py3-none-any.whl:
Publisher:
publish.yml on blockanalitica/bakit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
balabs_kit-0.9.1-py3-none-any.whl -
Subject digest:
36cbbd838bc83af7ba5e23137e3697f54a84fef1ca75714a94657f84582c2f52 - Sigstore transparency entry: 2776934080
- Sigstore integration time:
-
Permalink:
blockanalitica/bakit@d8951ba11f3e1a11a65662905b3f1adb099bbd9f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/blockanalitica
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d8951ba11f3e1a11a65662905b3f1adb099bbd9f -
Trigger Event:
workflow_dispatch
-
Statement type: