Skip to main content

Reusable Lightweight Pythonic Dependency Injection Library

Project description

Vacuna

Inject everything!

PyPI PyPI - Python Version PyPI - Downloads PyPI - License codecov

Vacuna is a little library to provide dependency management for your python code.

Install

pip install vacuna

Usage

import vacuna

container = vacuna.Container()

@container.dependency(name='app')
class App:
    def run(self):
        print('very important computation')

@container.dependency()
def main(app):
    app.run()

if __name__ == '__main__':
    container.run(main)

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

vacuna-0.2.2.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

vacuna-0.2.2-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

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