🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

engin

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

engin

An async-first modular application framework

0.0.19
PyPI
Maintainers
1

codecov

Engin 🏎️

Engin is a zero-dependency application framework for modern Python.

Documentation: https://engin.readthedocs.io/

Features ✨

  • Dependency Injection - Engin includes a fully-featured Dependency Injection system, powered by type hints.
  • Lifecycle Management - Engin provides a simple & portable approach for attaching startup and shutdown tasks to the application's lifecycle.
  • Code Reuse - Engin's modular components, called Blocks, work great as distributed packages allowing zero boiler-plate code reuse across multiple applications. Perfect for maintaining many services across your organisation.
  • Ecosystem Compatability - Engin ships with integrations for popular frameworks that provide their own Dependency Injection, for example FastAPI, allowing you to integrate Engin into existing code bases incrementally.
  • Async Native: Engin is an async framework, meaning first class support for async dependencies. However Engin will happily run synchronous code as well.

Installation

Engin is available on PyPI, install using your favourite dependency manager:

  • pip:pip install engin
  • poetry: poetry add engin
  • uv: uv add engin

Getting Started

A minimal example:

import asyncio

from httpx import AsyncClient

from engin import Engin, Invoke, Provide


def httpx_client() -> AsyncClient:
    return AsyncClient()


async def main(http_client: AsyncClient) -> None:
    print(await http_client.get("https://httpbin.org/get"))

engin = Engin(Provide(httpx_client), Invoke(main))

asyncio.run(engin.run())

Keywords

Application Framework

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts