mediapills / dependency-injection Goto Github PK
View Code? Open in Web Editor NEWPython Dependency Injection container
License: MIT License
Python Dependency Injection container
License: MIT License
More info you can find here...
Autowiring
is an exotic word that represents something very simple: the ability of the container to automatically create and inject dependencies.
Add Read the Docs integration and badge
Add Travis checks and badge
def service( # dead: disable
self, key: str,
mode: int = SERVICE_MODE_COMMON,
required: List[str]
) -> Callable:
"""Assign a callable value to the specified offset."""
attribute required
will define keys list used in service from DI
Implement copy
function to get copy of frozen object
You can use the string(key: str)
helper to concatenate strings entries:
from mediapills.dependency_injection import Container
di = Container({
"placeholder.one": "value one",
"message": "placeholder.one => '{placeholder.one}'",
})
di.string("message")
Add classes MediapillsDI
and ReflectedDI
.
The ReflectedDI is a class with access for private variables via special keys _version
, _frozen
etc.
The MediapillsDI will check all mediapills libraries and will auto load classes from there.
Move TestInjectorExamples
testcase into examples directory documentation and code examples.
Add aditional check for Python 3.7 and 3.6
This definition format is the most powerful of all. There are several kind of entries you can define:
More info here
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.