Metadata-Version: 2.4
Name: depends-tools
Version: 1.0.1
Summary: A Python dependency injection framework, it's like fastapi.Depends
Author: surp1us
Project-URL: Homepage, https://github.com/JokerCrying/py-depends-tools
Project-URL: Repository, https://github.com/JokerCrying/py-depends-tools
Project-URL: Bug Tracker, https://github.com/JokerCrying/py-depends-tools/issues
Keywords: dependency,injection,di,ioc
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Dynamic: license-file

# py-depends

A lightweight and elegant Python dependency injection framework.

## Features

- 🚀 Simple and intuitive API
- 🔄 Support for both sync and async dependencies
- 🏭 Factory pattern support
- 🎯 Type-safe dependency resolution
- 📦 Zero external dependencies
- 🧪 Comprehensive test coverage

## Installation

```bash
pip install depends-tools
```

## Quick Start

```python
from depends_tools import Depends, inject

# Define a dependency
def get_database():
    return "database_connection"

# Use the dependency
@inject
def get_user(db=Depends(get_database)):
    return f"User from {db}"

# Resolve dependencies
result = get_user()
print(result)  # Output: User from database_connection
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Support

If you encounter any issues or have questions, please [open an issue](https://github.com/JokerCrying/py-depends-tools/issues) on GitHub.
