Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

bazaar-contrib-schema

Register contrib-owned tables and migrations through SCHEMA before starting business services.

bcn contrib add schema --enable

The corresponding entry in config.toml:

version = "5"

[[contribs]]
package = "bazaar-contrib-schema~=0.3.0rc1"
[[contribs.enabled]]
entry = "schema"
from contextlib import asynccontextmanager

from bazaar_contrib_schema import SCHEMA, Migration, ModuleSchema
from bazaar_contrib_storage import ColumnDefinition, CreateTable, Table
from bazaar_core import Context, Contrib

MODULE = ModuleSchema(
    tables=("notes",),
    migrations=(
        Migration(
            version=1,
            name="create_notes",
            operations=(
                CreateTable(
                    table=Table(
                        name="notes",
                        columns=(ColumnDefinition(name="id", type="text"),),
                        primary_key=("id",),
                    )
                ),
            ),
        ),
    ),
)


@asynccontextmanager
async def lifespan(ctx: Context):
    async with ctx.accept(SCHEMA).register(MODULE):
        # Create and offer business services here, after migrations finish.
        yield


notes = Contrib(accepts=[SCHEMA], lifespan=lifespan)

Append consecutive migration versions starting at 1 and keep published migrations unchanged.

Metadata

Release files for bazaar-contrib-schema 0.3.0rc5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bazaar-contrib-schema 0.3.0rc5
File Size Uploaded Provenance Actions
bazaar_contrib_schema-0.3.0rc5.tar.gz 9.4 kB Without provenance Details for bazaar_contrib_schema-0.3.0rc5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bazaar-contrib-schema 0.3.0rc5
File Interpreter ABI Platform Actions
bazaar_contrib_schema-0.3.0rc5-py3-none-any.whl Python 3 none any Details for bazaar_contrib_schema-0.3.0rc5-py3-none-any.whl

Total release size: 19.9 kB

Release files / bazaar_contrib_schema-0.3.0rc5.tar.gz

Download URL bazaar_contrib_schema-0.3.0rc5.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f18bef68d064e91fcf07f4b8580f6b6d5005f93d268f76470470863b30f9eaad
BLAKE2b-256 checksum
How to use checksums
31c2c9d3b8341d93c5077bdcf86c3eb34f375a0f4e1e14877afa65b4c43fd2cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / bazaar_contrib_schema-0.3.0rc5-py3-none-any.whl

Download URL bazaar_contrib_schema-0.3.0rc5-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f73bab3c0e70ede52e7c465dabeea65f17048d966ff760a86c6d3b95e8cab6d0
BLAKE2b-256 checksum
How to use checksums
fa522e0187928b6b3082e613091423f52a9fb3ed6fb2dff2b7cfe215676100d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for bazaar-contrib-schema 0.3.0rc5

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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