Skip to main content

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.11.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 balabs-kit 0.11.1
File Size Uploaded
balabs_kit-0.11.1.tar.gz 27.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for balabs-kit 0.11.1
File Interpreter ABI Platform
balabs_kit-0.11.1-py3-none-any.whl Python 3 none any Details

Total release size: 61.0 kB

Release files / balabs_kit-0.11.1.tar.gz

Download URL balabs_kit-0.11.1.tar.gz
Size 27.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6f1989e9ee5c80458cf6351eaa13ef146a17efcd70259895c09a55b81e0e02b3
BLAKE2b-256 checksum
How to use checksums
4c4b6fd81913bc526096ac2bf66ecc05668cb2a124443b9064a30723078f639b
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 Oct 2, 2026.

Transparency log

Release files / balabs_kit-0.11.1-py3-none-any.whl

Download URL balabs_kit-0.11.1-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2604ee14220a600ec2d071d0b8f943ce0f9e71f9bb7a68cf084a49ce7b1b848b
BLAKE2b-256 checksum
How to use checksums
7a1141cdce83a4ea990b2c49e8fbcbf7561eec75639b12585903aa42b801768d
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 Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

0.14.4

2 release files

0.14.3

2 release files

0.14.2

2 release files

0.14.1

2 release files

This release

0.11.1 This release

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.29

2 release files

0.0.28

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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