{"id":32964591,"url":"https://github.com/invokermain/engin","last_synced_at":"2026-01-27T07:25:40.645Z","repository":{"id":258851800,"uuid":"871881978","full_name":"invokermain/engin","owner":"invokermain","description":"A lightweight Application Framework for Python powered by Dependency Injection","archived":false,"fork":false,"pushed_at":"2025-12-15T11:08:18.000Z","size":791,"stargazers_count":20,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-16T17:28:11.270Z","etag":null,"topics":["application-framework","dependency-graph","dependency-injection","python"],"latest_commit_sha":null,"homepage":"https://engin.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/invokermain.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-13T07:51:58.000Z","updated_at":"2025-12-15T11:07:28.000Z","dependencies_parsed_at":"2025-01-29T09:29:48.354Z","dependency_job_id":"b083e7b9-94dc-47f9-a9e2-f5737b7a645b","html_url":"https://github.com/invokermain/engin","commit_stats":null,"previous_names":["invokermain/engin"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/invokermain/engin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invokermain%2Fengin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invokermain%2Fengin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invokermain%2Fengin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invokermain%2Fengin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/invokermain","download_url":"https://codeload.github.com/invokermain/engin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/invokermain%2Fengin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28808005,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:14:39.408Z","status":"ssl_error","status_checked_at":"2026-01-27T07:14:39.098Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["application-framework","dependency-graph","dependency-injection","python"],"created_at":"2025-11-13T02:00:37.390Z","updated_at":"2026-01-27T07:25:40.640Z","avatar_url":"https://github.com/invokermain.png","language":"Python","funding_links":[],"categories":["Software"],"sub_categories":["DI Frameworks / Containers"],"readme":"# Engin 🏎️\n\n[![codecov](https://codecov.io/gh/invokermain/engin/graph/badge.svg?token=4PJOIMV6IB)](https://codecov.io/gh/invokermain/engin)\n![Downloads](https://img.shields.io/pypi/dw/engin)\n---\n\n**Documentation**: [https://engin.readthedocs.io/](https://engin.readthedocs.io/)\n\n**Source Code**: [https://github.com/invokermain/engin](https://github.com/invokermain/engin)\n\n---\n\nEngin is a lightweight application framework powered by dependency injection. It helps\nyou build and maintain everything from large monoliths to hundreds of microservices.\n\n\n## Features\n\nEngin provides:\n\n- A fully-featured dependency injection system.\n- A robust runtime with lifecycle hooks and supervised background tasks.\n- Zero-boilerplate code reuse across applications.\n- Integrations for popular frameworks like FastAPI.\n- Full asyncio support.\n- A CLI for development utilities.\n\n\n## Installation\n\nEngin is available on PyPI, install it using your favourite dependency manager:\n\n- `pip install engin`\n- `poetry add engin`\n- `uv add engin`\n\n## Example\n\nHere’s a minimal example showing how Engin wires dependencies, manages background tasks, and\nhandles graceful shutdown.\n\n```python\nimport asyncio\nfrom httpx import AsyncClient\nfrom engin import Engin, Invoke, Lifecycle, OnException, Provide, Supervisor\n\n\ndef httpx_client_factory(lifecycle: Lifecycle) -\u003e AsyncClient:\n    client = AsyncClient()\n    lifecycle.append(client)  # easily manage the AsyncClient's lifecycle concerns\n    return client\n\n\nasync def main(httpx_client: AsyncClient, supervisor: Supervisor) -\u003e None:\n    async def long_running_task():\n        while True:\n            await httpx_client.get(\"https://example.org/\")\n            await asyncio.sleep(1.0)\n\n    supervisor.supervise(long_running_task)  # let the app run the task in a supervised manner\n\n\nengin = Engin(Provide(httpx_client_factory), Invoke(main))  # define our modular application\n\nasyncio.run(engin.run())  # run it!\n```\n\nExpected output (with logging enabled):\n\n```\n[INFO]  engin: starting engin\n[INFO]  engin: startup complete\n[INFO]  engin: supervising task: long_running_task\n[INFO]  httpx: HTTP Request: GET https://example.org/ \"HTTP/1.1 200 OK\"\n[INFO]  httpx: HTTP Request: GET https://example.org/ \"HTTP/1.1 200 OK\"\n[INFO]  httpx: HTTP Request: GET https://example.org/ \"HTTP/1.1 200 OK\"\n[DEBUG] engin: received signal: SIGINT\n[DEBUG] engin: supervised task 'long_running_task' was cancelled\n[INFO]  engin: stopping engin\n[INFO]  engin: shutdown complete\n```\n\n## Inspiration\n\nEngin is heavily inspired by [Uber's Fx framework for Go](https://github.com/uber-go/fx)\nand the [Injector framework for Python](https://github.com/python-injector/injector).\n\nThey are both great projects, go check them out.\n\n## Benchmarks\n\nAutomated performance benchmarks for Engin are available [here](https://invokermain.github.io/engin/dev/bench/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvokermain%2Fengin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finvokermain%2Fengin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finvokermain%2Fengin/lists"}