APIs and microservices
Typed use cases with rules and dependencies in the signature. Auto-CRUD and OpenAPI on FastAPI. Repositories decoupled from the database.
Open source · Apache-2.0 · Python 3.11+
One typed foundation for APIs, ETL, streaming, agents and jobs. Contracts, rules and permissions are declared, compiled into an execution plan at start-up and checked before the first request.
class CreateUserUseCase(UseCase[User, User]): rules = [ Rule.check(F(CreateUser).email, via=_email_must_be_valid), Rule.forbid(lambda _, __, exists: exists, message="email already exists") .from_params("email_exists"), ] async def execute( self, cmd: CreateUser = Input(), email_exists: bool = Exists(User, from_command="email", against="email"), ) -> User: return await self.main_repo.create(cmd)
Exists checks a database condition before execute runs.Rule.check and Rule.forbid declare invariants, not if blocks.Typed use cases with rules and dependencies in the signature. Auto-CRUD and OpenAPI on FastAPI. Repositories decoupled from the database.
Declarative pipelines validated at compile time. Polars and delta-rs by default, Spark and Delta when needed. Upsert, partition replace, SCD2, checkpoints and lineage.
Kafka, Bytewax and Mongo CDC with explicit delivery semantics.
Agents defined in YAML and validated offline, with typed permissions. Bedrock, OpenAI, Anthropic and TypeSafe.
Background jobs and Celery workers as first-class citizens, with the same rules as your use cases.
Golden tests, in-memory repositories, Polars and Spark step runners. structlog, OpenTelemetry and Prometheus.
loom is the foundation of Periplo, our platform. Periplo already catalogs and queries the tables your loom pipelines write; next, it will follow their runs and create, deploy and observe loom services for you.