Skip to main content

The modular framework for your ideas. Create. Combine. Repeat.

Project description

tileable

Release Build status Commit activity License

Tileable is a Python 3.12+ framework for building modular, event-driven workflows out of tiny, well-typed “tiles”. It emphasises clarity (KISS), internal reuse, and complete testability.

Design Principles

  • Predictable primitives — Tiles are simple classes with explicit payload/result models.
  • Runtime ergonomics — The registry, event bus, and plugin manager do the wiring so you can compose tiles rapidly.
  • State you can trust — Service injection and per-run state live on a strongly-typed context object.
  • Observability first — Every run emits lifecycle events that you can subscribe to or persist.

Quick Tour

All docs and tests reference the executable example in examples/greeting.py. The snippet below can be run as-is:

from examples.greeting import GreetingPayload, GreetingPlugin, GreetingTile, showcase
from tileable import EventBus, TilePluginManager, TileRegistry, invoke_tile

# 1. Observe the plugin-driven workflow shipped with the library
result, debug_events, state = showcase(message="Tileable")
print(debug_events)  # [{'tile': 'greeting', 'message': 'Tileable'}]
print(result.response)  # "Hi, Tileable!"
print(state["runs"])   # 1

# 2. Assemble the same components manually
registry = TileRegistry()
plugins = TilePluginManager()
plugins.register(GreetingPlugin())

bus = EventBus()
bus.subscribe("tile.debug", lambda sender, **payload: print("debug", payload))

invoke_tile(
    "greeting",
    GreetingPayload(message="Operator"),
    registry=registry,
    plugins=plugins,
    event_bus=bus,
)

Runtime flow:

  1. The plugin contributes GreetingTile via tile_specs and seeds services/state in tile_startup.
  2. invoke_tile resolves the tile, attaches a TileContext, and emits runtime.* / tile.* events.
  3. The event bus surfaces debug payloads while the tile returns a strongly typed result.
  4. Lifecycle hooks keep context and state aligned, even when exceptions occur.

Core Concepts

  • Tile — Subclass tileable.Tile and implement execute (and optionally aexecute).
  • TileContext — Automatically injected context exposing services, state, and emit.
  • TileRegistry — Tracks available tiles and resolves string references.
  • EventBus — Lightweight blinker-backed pub/sub for runtime monitoring.
  • TilePluginManager — Pluggy integration for discovering tiles or reacting to lifecycle events.

Develop with Confidence

Tileable requires Python 3.12+. Verify with python --version before syncing.

make install   # create uv environment + pre-commit hooks
make check     # lint, type-check, dependency hygiene
make test      # pytest (sync, async, doctests)
tox -e py312,py313  # matrix verification
uv run mkdocs serve # docs preview at http://localhost:8000

CI expects lint + test green before merge. Pre-commit hooks (uv run pre-commit run -a) keep formatting consistent.

Learn More

  • Read the full guide: https://tileable.dev/
  • Explore runnable samples in examples/
  • Consult AGENTS.md for contributor expectations and workflows.

Repository initiated with fpgmaas/cookiecutter-uv, heavily customised for Tileable’s design philosophy.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tileable-0.0.1.tar.gz (59.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tileable-0.0.1-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file tileable-0.0.1.tar.gz.

File metadata

  • Download URL: tileable-0.0.1.tar.gz
  • Upload date:
  • Size: 59.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for tileable-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9db949fe604416c99e6ba1b10f51243255dc0ea0c99294a1f533a06fb120453e
MD5 21b49e3b961116352cc3dc8029813f03
BLAKE2b-256 2e0bede713c8516fbd88359313f1e0902f0fa0950a302a382b8478db2adf349c

See more details on using hashes here.

File details

Details for the file tileable-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: tileable-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for tileable-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9dfad4a79d18349efa0f8e00c4c49ac9b60290b0de7f4d729491de7cf66a2f4b
MD5 007ce60980df7cc243dcb2dc9a5c9d83
BLAKE2b-256 f3a829333fefe797a0c3fa70cfd75e6d74ebf66675f7ea19654b134e1863f020

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page