Tiny module-service and dependency injection framework
Project description
Symbiont
Tiny module-service and dependency injection framework
Installation
pip install <>
Usage
from symbiont import Module, Injectable, DependencyInjector
class BarService(Injectable):
x: int = 42
class FooService(Injectable):
bar: BarService
class ExampleModule(
Module,
providers=[BarService, FooService]
):
foo: FooService
class RootModule(
Module,
imports=[ExampleModule]
):
foo: FooService
injector = DependencyInjector()
root = injector.initialize(RootModule)
@injector.inject
def example_method(a, foo: FooService):
...
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
symbiont-0.1.0.tar.gz
(2.9 kB
view details)
Built Distribution
File details
Details for the file symbiont-0.1.0.tar.gz
.
File metadata
- Download URL: symbiont-0.1.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.10.4 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a873808be3e5f46f7063a2a07f5f624440908ce5ab7733879d57d362aff00a60 |
|
MD5 | 461d49700e1369e1ae42c2f8f33ff65b |
|
BLAKE2b-256 | 5fabf325149fd8d4011340888ebabf935ec05c97a8fd3024f6d0283e8a3af90a |
File details
Details for the file symbiont-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: symbiont-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.10.4 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 270a68604e151724ab534e2cb8a341ab68612076a8516cee5bda81905499feca |
|
MD5 | 2fc802e5c6a85f7229ebab40d1cc6156 |
|
BLAKE2b-256 | e680e6cb2d1820eed97d9814a7faedfb9cc1693dd51378ee8f9f8cae5a910901 |