Skip to main content
Pre-release

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

bazaar-contrib-server

The Bazaar Compute server itself. The server entry draws the shell around every module — the sidebar, the overview and the settings page — and offers SERVER, where modules register their pages, API and permission points, and THEME, where theme contribs register the looks the pages can wear. The server-theme-night and server-theme-day entries are the theme plugins it comes with: the night market and the morning market.

[[contribs]]
package = "bazaar-contrib-server~=0.3.0rc1"
[[contribs.enabled]]
entry = "server"
[[contribs.enabled]]
entry = "server-theme-night"
[[contribs.enabled]]
entry = "server-theme-day"

A module registers what it serves inside its lifespan; each registration holds while its context is open:

import asyncio
from contextlib import asynccontextmanager

from bazaar_contrib_server import SERVER, PermissionItem, SidebarItem
from bazaar_core import Context, Contrib
from importlib.resources import files
from pathlib import Path
from starlette.routing import Route


@asynccontextmanager
async def lifespan(ctx: Context):
    server = ctx.accept(SERVER)
    pages = await server.pages("notes", __package__)

    async def home(request):
        return await pages.render(request, "notes.html")

    resources = Path(str(files(__package__))) / "resources"
    icon = await asyncio.to_thread((resources / "notes.svg").read_text)
    async with (
        server.module(
            "notes",
            ui=pages.application([Route("/", home)]),
            static=resources / "static",
            locales=resources / "locales",
        ),
        server.permission(
            PermissionItem(point="notes.view", description="notes.view.description")
        ),
        server.sidebar(
            SidebarItem(
                text="notes.title",
                icon=icon,
                path="/notes",
                permission="notes.view",
            )
        ),
    ):
        yield


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

The icon is an SVG drawn as the design's are, with class i and a 24×24 view box. The module's interface is served at /ui/notes inside the shell at /notes, its API at /api/notes and its files at /static/notes. Its templates live in resources/templates of its package and extend server/base.html, which brings the theme stylesheet and the embedding script; pages of any other framework include /static/server/theme.css and /static/server/embed.js themselves. Everything behind the shell needs a login module, which registers itself with server.login; until one does, those pages and APIs answer 503.

Metadata

Release files for bazaar-contrib-server 0.3.0rc1

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-server 0.3.0rc1
File Size Uploaded Provenance Actions
bazaar_contrib_server-0.3.0rc1.tar.gz 452.3 kB Without provenance Details for bazaar_contrib_server-0.3.0rc1.tar.gz

Built distribution (wheel)

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

Total release size: 915.5 kB

Release files / bazaar_contrib_server-0.3.0rc1.tar.gz

Download URL bazaar_contrib_server-0.3.0rc1.tar.gz
Size 452.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b142381a120244125230b9d57223bef41539e36926a59c9c4fa753e54ed9d595
BLAKE2b-256 checksum
How to use checksums
dee28f09641dd6638de17ca4254eb3922df716e945268c93fe74f5ddfcf4136d
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_server-0.3.0rc1-py3-none-any.whl

Download URL bazaar_contrib_server-0.3.0rc1-py3-none-any.whl
Size 463.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59510d77253616451a59e8aacce4b83132f491e892a8c21e1a1c4a20ed7afb8a
BLAKE2b-256 checksum
How to use checksums
e2a05ca77b109e7720e7febff7ed5526d306b0ff20b9d1ae6db5002f93fd7f36
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-server 0.3.0rc1

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.

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