Skip to main content

bakery

Bakes one slot's renders into the wall's mip chain, and serves it. A slot is one set of renders over the whole corpus; each item gets a 128px loose tile, and every item's 8px and 32px tiles are composed onto one sheet per level, with a JSON manifest beside each sheet.

It knows nothing about what the items are. brick-icons is the first host.

pip install pezlie
pip install 'pezlie[routes]'  # with the FastAPI routes
pip install 'pezlie[feed]'    # with pezlie.feed, which writes Arrow feeds

It needs resvg on PATH for SVG renders. The wall that draws what it bakes is pezlie on npm.

What a host supplies

  • The renders for a slot — Render(id, path, sha) per item that has one. SVG goes through resvg; anything else is opened with Pillow.
  • The full order — every item id, drawn or not. A cell's index on a sheet is its position in this list, so the host must send the same order to compose and to the wall's feed, or every sprite lands off by one. compose refuses a list that repeats an id.
  • For the routes — a slot-name-to-directory lookup, a lookup naming the render file for an item in a slot, and the root those files must sit under.

What it promises

  • Ink, never ground. Tiles and sheets are transparent where there is no ink. The wall paints the ground.
  • One writer per slot. bake_item, compose and bake_slot hold a lock on <slot>/.bake.lock and raise BakeInProgress instead of interleaving.
  • Freshness by sha. An item whose sha matches baked.json, with tiles in the current format, is not rebaked. The manifest carries the sha map, so the wall can tell a stale cell from a fresh one.
from pezlie.batch import Render, bake_slot
bake_slot(renders, out="thumbs/occt", order=all_ids)

from pezlie.routes import render_router, thumbs_router
app.include_router(thumbs_router(slot_dir), prefix="/api/thumbs")
app.include_router(render_router(render_file, root, known_slot), prefix="/api/corpus/render")

Develop

Needs resvg on PATH.

uv venv bakery/.venv --python 3.14
uv pip install --python bakery/.venv/bin/python -e 'bakery[test]'
bakery/.venv/bin/python -m pytest bakery -q

tests/test_parity.py bakes the same inputs through brick-icons' brick_icons/thumbs.py and through this package and compares bytes. It looks for a brick-icons checkout beside pezlie, or at $BRICK_ICONS, and skips without one.

Metadata

Release files for pezlie 0.2.0

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

Source distribution (sdist)

Source distribution for pezlie 0.2.0
File Size Uploaded Provenance Actions
pezlie-0.2.0.tar.gz 13.0 kB Without provenance Details for pezlie-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pezlie 0.2.0
File Interpreter ABI Platform Actions
pezlie-0.2.0-py3-none-any.whl Python 3 none any Details for pezlie-0.2.0-py3-none-any.whl

Total release size: 24.4 kB

Release files / pezlie-0.2.0.tar.gz

Download URL pezlie-0.2.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7c823bcefbe33703841936167241705ca3f7dde46ff76e5db7dc62ca317d268a
BLAKE2b-256 checksum
How to use checksums
d95583b8dcfdd53fef15658baf434601a57113270c07090fa958c94b1a7d8464
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.7

Release files / pezlie-0.2.0-py3-none-any.whl

Download URL pezlie-0.2.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9dfac265c7d17b1ad5bf95a7f7c9a27606b36e337481c32aa3c96d024b3154c4
BLAKE2b-256 checksum
How to use checksums
1b6669658a30ed7bb67085840f17e9bdc9ed85b42f8f842198a7cde7e3656214
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.7

Security for pezlie 0.2.0

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

0.2.0 This release

2 release files No provenance

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