Starlette-di

Latest version: v0.1.1

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

Scan your dependencies

0.1.1

[0.1.1](https://github.com/daireto/starlette-di/compare/v0.1.0...v0.1.1) (2025-03-14)

> Adds new types for the lifetime and implementation attributes of `Service` class and removes an incorrect classifier in the project config file.

Added
- **New types**: Added `Lifetime` and `Implementation` types.
- **Package docstring**: Added the docstring for the package.

Fixed
- **Remove incorrect classifier**: Removed incorrect classifier in the `pyproject.toml` file.

0.1.0

[0.1.0](https://github.com/daireto/starlette-di/commits/v0.1.0) (2025-03-13)

> First release.

Features

- **Scoped, Transient, and Singleton**: Dependency injection with three service lifetimes, similar to .NET Core.
- **Service Injection**: Supports injecting services into functions, methods, and endpoint classes in Starlette.
- **Route Parameter Injection**: Automatically extracts URL parameters in controllers.
- **Request Body Injection**: Maps JSON request body data directly to Pydantic models.
- **Dependency Injection Middleware**: Provides a middleware layer to manage dependency injection throughout the request lifecycle.
- **Pydantic Compatibility**: Leverages Pydantic for data validation, and conversion.
- **Decorators for Endpoints**: Simplifies injection with `inject`, `inject_method`, and `inject_class`.

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.