The 'remix' your architecture needs: NestJS-style modularity, native async performance, and rigorous typing for Python 3.14+. Less boilerplate, more harmony.
Project description
🎧 dijay
Drop the beat on your dependencies.
dijay is the "remix" your architecture needs: NestJS-style modularity, native async performance, and rigorous typing for Python 3.14+. Less boilerplate, more harmony.
🚀 Features
- Modular Architecture: Organize code into
@modules withimports,providers, andexports. - Constructor Injection: Clean, testable injection via
__init__andAnnotated. - Flexible Scopes:
SINGLETON,TRANSIENT, andREQUEST. - Async Native: First-class support for asynchronous factories and lifecycle hooks.
- Custom Providers:
Providedataclass for value, class and factory bindings. - Lifecycle Hooks:
@on_bootstrapand@on_shutdowndecorators. - Circular Dependency Detection: Immediate
RuntimeErroron cycles.
📦 Installation
uv add dijay
⚡ Quick Start
import asyncio
from dijay import Container, injectable, module
@injectable()
class CatsService:
def get_all(self):
return ["Meow", "Purr"]
@module(providers=[CatsService], exports=[CatsService])
class CatsModule: ...
@module(imports=[CatsModule])
class AppModule: ...
async def main():
async with Container.from_module(AppModule) as container:
service = await container.resolve(CatsService)
print(service.get_all())
if __name__ == "__main__":
asyncio.run(main())
📖 Documentation
For the full documentation — including guides on modules, providers, injection, lifecycle hooks, FastAPI integration, and the complete API reference — visit:
🔗 leandroluk.github.io/python-dijay
🛠️ Development
uv sync
uv run pytest
uv build
📄 License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dijay-0.3.38.tar.gz.
File metadata
- Download URL: dijay-0.3.38.tar.gz
- Upload date:
- Size: 66.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4748570b01cf735443fd5f9baf565036193c0e349f1f693f8039fc6e2862d47b
|
|
| MD5 |
5f65b675a4f71701bc4cd217d95c3b00
|
|
| BLAKE2b-256 |
cb3f5e002097b85d596feafdb3e45faa7af62370b415863690047008c6f6d7b5
|
File details
Details for the file dijay-0.3.38-py3-none-any.whl.
File metadata
- Download URL: dijay-0.3.38-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53a4da80a9a7665dd417f0fd075b5b557b76fea96a676e4b652d4d62fbdb2edf
|
|
| MD5 |
4c94053ad6b205dd7b5251d5435a8a28
|
|
| BLAKE2b-256 |
9b2a1c14e1d00f871603d6442d698f7b766769db230e9f4281ef3678e170903f
|