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 composing event-driven workflows from small, typed “tiles”. It keeps ergonomics, observability, and testability front and centre.

Quickstart

make install          # set up the uv environment + pre-commit hooks
python -m examples.greeting

Example output:

[debug] {'tile': 'greeting', 'message': 'Tileable'}
Hi, Tileable!
runs=1

Prefer a REPL? The demo tile is wired exactly like production code:

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

# Discover tiles via the bundled plugin
result, debug_events, state = showcase(message="Tileable")

# Or assemble the pieces manually
registry = TileRegistry()
plugins = TilePluginManager()
plugins.register(GreetingPlugin())
bus = EventBus()
state = {"runs": 0}

with bus.record() as lifecycle:
    result = invoke_tile(
        "greeting",
        GreetingPayload(message="Operator"),
        registry=registry,
        plugins=plugins,
        event_bus=bus,
        state=state,
    )

print(result.response)
print(lifecycle.payloads("tile.debug"))
print(state["runs"])

Why tiles feel good

  • Predictable primitives — A tile is just a tiny class with typed payload/result models.
  • Observability firstEventBus.record() captures lifecycle events without throwaway subscribers.
  • State you can trust — Services and per-run state live on TileContext, keeping plugins and tiles aligned.
  • Plugins without painTilePluginManager contributes tiles, startup hooks, and shutdown hooks on demand.

Build, observe, extend

Run tiles and capture context

from tileable import invoke_tile

result, ctx = invoke_tile(
    "greeting",
    GreetingPayload(message="Developer"),
    return_context=True,
)

print(result.response)
print(dict(ctx.services))      # services added during execution
print(ctx.state.get("runs"))

Scope runtime state for tests

from tileable import scoped_runtime, TileRegistry

with scoped_runtime(registry=TileRegistry()):
    ...  # run tiles without touching the global defaults

Listen in when you need full control

bus = EventBus()

unsubscribe = bus.subscribe("tile.failed", lambda sender, **payload: print(payload))
invoke_tile(..., event_bus=bus)
unsubscribe()

Quality gates

make check    # ruff lint + formatter, ty type-checking, deptry hygiene
make test     # pytest (sync + async paths and doctests)
tox -e py312,py313  # interpreter matrix + coverage xml

CI expects these commands to pass before merging. Pre-commit hooks (uv run pre-commit run -a) keep formatting aligned.

Learn more

  • Full documentation: https://tileable.dev/
  • Additional demos: examples/
  • Advanced recipes: docs/advanced.md
  • Contributor handbook: AGENTS.md

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.2.tar.gz (65.1 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.2-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tileable-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fc22aa2fce32b7d99c1d07e0c09de56979278388699f17195c86dfb65b594708
MD5 d296255660be45341871674d9d5fdb9d
BLAKE2b-256 0992f53dabec0c37ea6dccc5da2ea3c6c5f39d6a8b104f69f9155b21430ac182

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tileable-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bb2f21be0ad5aeaaddb6b8fcf97502b36cc66ebae6501aa87bd8fb0907a4f9ec
MD5 54da5d03897a555dd8642f6817f8e8d8
BLAKE2b-256 5e1128a89eb0a769d8aeceef1d63588d740741b636b3f1a55f9771678f427d69

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