molten is a minimal, extensible, fast and productive framework for building HTTP APIs with Python. molten can automatically validate requests according to predefined schemas, ensuring that your handlers only ever run if given valid input. Schemas are PEP484-compatible, which means mypy and molten go hand-in-hand, making your code more easy to maintain. Schema instances are automatically serializable and you can pick and choose which fields to exclude from responses and requests. Write clean, decoupled code by leveraging DI. Define components for everything from settings to DB access and business logic, test them in isolation and swap them out as needed. Here we’ve declared a Todo manager whose job it is to store and load Todos in the DB. In order for handlers to be able to request manager instances from the DI system, we also define a component that knows how and when to instantiate a TodoManager.
Features
- Functional Middleware
- Dependency Injection
- Request Validation
- molten is a minimal, extensible, fast and productive framework
- Build HTTP APIs with Python
- Type Safe