Skip to main content

A simple dependency injector based on type hints

Project description

# HinteDI - simple dependency injection system with type hints

This package is a small utility I have been using in my own projects, a super simple tool for basic dependency injection in python based on type hints and decorators.

This package exposes three classes: HinteDI, InjectionException and InstanceSentinel. Import HinteDI and use `@HinteDI.singleton` and `@HinteDI.instance` to create dependencies and `@HinteDI.inject` to mark a function as requiring dependency injection. Type hint the dependencies in the injected function and HinteDI will inject the dependencies for you. See the docs at [GitHub pages](https://eddiethecubehead.github.io/HinteDI/) for better documentation about the package.

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

HinteDI-0.2.0.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

HinteDI-0.2.0-py3-none-any.whl (6.3 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