ets-labs / python-dependency-injector Goto Github PK
View Code? Open in Web Editor NEWDependency injection framework for Python
Home Page: https://python-dependency-injector.ets-labs.org/
License: BSD 3-Clause "New" or "Revised" License
Dependency injection framework for Python
Home Page: https://python-dependency-injector.ets-labs.org/
License: BSD 3-Clause "New" or "Revised" License
Adding of Google Analytics for documentation on RTD
We need to create a ScopedProvider
. The idea is of this provider that it behaves like a singleton, but has not only one scope.
ScopedProvider
should support not only one scope and should have functionality for clearing all the scopes.
File formats: .gliffy, .gxml
Fix the crutch with injection.value
:
class Injection(object):
"""Base injection class."""
def __init__(self, name, injectable):
"""Initializer."""
self.name = name
self.injectable = injectable
@property
def value(self):
"""Return injectable value."""
if hasattr(self.injectable, '__is_objects_provider__'): # TODO: Fix this
return self.injectable()
return self.injectable
File formats: .vsd, .vsx, .vsdx
Integration of Coveralls
Python lib - coveralls-python
Expectations from current integration are:
Acceptance criterias:
The idea is not to create overridden
list for every Provider
instance. This could be done just in override time.
Acceptance criterias:
Creation of Objects
internals class diagram
Need to create documentation structure
It seems a little bit confusing
Acceptance criterias:
https://pypip.in/ is not reachable anymore, need to remove or replace its badges from README
Need to create Callable
provider. Current Function
provider is a static provider of an function object.
Idea of Callable
is to provide an callable function with some predefined dependencies.
Need to add Objects
-specific errors hierarchy.
Integration of TravisCI and tox.
Expectations from current integration are:
Acceptance criterias:
publish
command in setup.pyMake project's shields using https://pypip.in/
Acceptance criterias:
File formats: .graffle, .graffle.zip
There are some kind of situations with settings injections that should be handled in special way:
- Most of the systems make settings global usable (Django settings, Flask app.config etc...). This is not a best practice.
- Settings could be defined after the objects catalog is defined. So best what `objects` can do now is:
class Catalog(AbstractCatalog):
config = ExternalDependency(instance_of=dict)
consumer = NewInstance(SomeClass,
InitArg('config', config))
Catalog.config.satisfy(Object(dict(some_key='some_value')))
The idea is to make special type of provider for such cases:
class Catalog(AbstractCatalog):
config = Config()
consumer = NewInstance(SomeClass,
InitArg('some_setting', config.some_key))
Catalog.config.satisfy(Object(dict(some_key='some_value')))
Acceptance criterias:
Acceptance criterias:
Add __slots__
attribute for all classes to get more effective memory usage.
Acceptance criterias:
There are some kind of situations with settings injections that should be handled in special way:
objects
can do now is:class Catalog(AbstractCatalog):
config = ExternalDependency(instance_of=dict)
consumer = NewInstance(SomeClass,
InitArg('config', config))
Catalog.config.satisfy(Object(dict(some_key='some_value')))
The idea is to make special type of provider for such cases:
class Catalog(AbstractCatalog):
config = Config()
consumer = NewInstance(SomeClass,
InitArg('some_setting', config.some_key))
Catalog.config.satisfy(Object(dict(some_key='some_value')))
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.