{"repo":"Fatal1ty/operetta","free":true,"listed":false,"github":"https://github.com/Fatal1ty/operetta","clone":"git clone https://github.com/Fatal1ty/operetta.git","description":"A lightweight framework for building Python applications that is not tied to a specific transport protocol","language":"Python","stars":13,"topics":["api","application","asyncio","ddd","dependency-injection","di","domain-driven-design","framework","openapi","redoc"],"license":"Apache-2.0","category":"api-integrations-sdks","readme_excerpt":"Design Python services right Operetta A lightweight framework for building Python applications that is not tied to a specific transport protocol. It is built on top of aiomisc (service lifecycle, entrypoint) and dishka (dependency injection). On top of that, the following integrations are available: - AIOHTTP: declarative handlers with DI for request body, query, and path params; automatic OpenAPI generation with Swagger and Redoc. - PostgreSQL via asyncpg: a database adapter and DI provider for a connection pool. - PostgreSQL with HA via hasql: a pool with balancing, failover and the same adapter layer. - Error monitoring via Sentry using sentry-sdk. - Prometheus metrics via prometheus-client: expose metrics over HTTP for scraping. Table of contents - Highlights - Installation - Quickstart (HTTP API) - How it works under the hood - Quickstart (non-HTTP app) - Services and DI - AIOHTTP - Configuration - Middleware ordering - Error handling and response format - PostgreSQL - Single-node PostgreSQL (asyncpg) - High-availability PostgreSQL cluster (hasql) - Advanced setup - Sentry - Configuration - Behavior and notes - Prometheus - Configuration - Usage Highlights - Services as units of functionality: each service starts/stops via aiomisc and may provide DI providers. - Single DI container (dishka) for the whole app; separate scopes for APP and REQUEST . - AIOHTTP integration: - Handler parameter annotations: FromBody[T] , FromQuery[T] , FromPath[T] . - Automatic parsing and val","default_branch":null,"files":null,"tree":[],"storefront":"/r/Fatal1ty","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Fatal1ty/operetta/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}