Skip to main content

Knot is a simple dependency container for Python.

Project description

https://badge.fury.io/py/knot.png https://travis-ci.org/jaapverloop/knot.png?branch=master

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)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page