Knot is a simple dependency container for Python.
Project description
Knot is a simple dependency container for Python.
Inspiration
Pimple (http://pimple.sensiolabs.org/)
Example
from knot import Container
c = Container()
@c.factory(cache=True)
def app(c):
from somewhere import App
app = App()
return app
Installation
Install Knot with the following command:
$ pip install knot
Tests
To run the tests, install pytest first:
$ pip install pytest
Then, run the tests with the following command:
$ make test
License
MIT, see LICENSE for more details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
knot-0.2.0.tar.gz
(4.1 kB
view hashes)