Engin

Latest version: v0.0.15

Safety actively analyzes 723217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.0.15

Changed

- `Provide` & `Supply` will now raise an error if overriding an existing provider from the
same package. This is to prevent accidental overrides. Users can explicitly allow
overrides by specifying the `override` parameter when defining the provider
`Provide(..., override=True)` or `provide(override=True)`.
- Lifecycle startup tasks will now timeout after 15 seconds and raise an error.
- Assembler's `get` method has been renamed to `build`.
- Supply's `type_hint` parameter has been renamed to `as_type`.

Fixed

- `Assembler` would occasionally fail to call all multiproviders due to inconsistent
ordering.

0.0.14

Added

- `LifecycleHook` class to help build simple lifecycles with a start and stop call.

Changed

- `engin-graph` has been replaced by `engin graph`.
- Engin now uses `typer` for an improved cli experience. Note the package now has an extra `cli` which must be installed to use the cli.
- `Assembler.add(...)` does not error when adding already registered providers.
- Use a more performant algorithm for inspecting frame stack.

Fixed

- `ASGIEngin` now properly surfaces startup errors.
- `Engin.run()` doing a double shutdown.

0.0.13

Changed

- `Provide` now supports union types.

0.0.12

Added

- `Assembler` has a new method `add(provider: Provide) -> None` which allows adding a
provider to the Assembler post initialisation.

Changed

- `Provide` now raises a `ValueError` if the factory function is circular, i.e. one of its
parameters is the same as its return type as the behaviour of this is undefined.
- The ASGI utility method `engin_to_lifespan` has been improved so that it works "out of
the box" for more use cases now.

0.0.11

Added

- Dependency types now have two new attributes `source_module` & `source_package`.

Changed

- `engin-graph` now highlights external dependencies.

0.0.10

Added

- A utility function for ASGI extension `engin_to_lifespan` enabling users to easily
integrate Engin into an existing ASGI application.
- Further documentation work, including a FastAPI guide.

Fixed

- The warning for missing multiproviders is only logged once for each given type now.

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.