Skip to main content

A dependency injection system for python

Project description

Fang is a dependency injection library for Python.

Fang adds dependency injection in Pythonic way, without requiring the elements more usually seen in “big OO” languages. Particularly:

  • dependencies are specified by identifier strings, rather than strict interface classes or types.

  • the constructs which meet dependencies (resource providers) are just functions, not factory classes.

  • the dependencies which a piece of code needs and the dependencies it can provide are both declared concisely with decorators.

  • the linking of dependents and resource providers is done at run-time in Python, not with a custom-built configuration language.

The pieces used are small and easy to understand: the total library is less than 300 lines. But it’s clear and simple enough to serve as a foundation for other features (eg dependency graphs, interface verification), which can enabled or added on a per-project basis.

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

fang-0.7.6.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fang-0.7.6-py34-none-any.whl (6.9 kB view details)

Uploaded Python 3.4

File details

Details for the file fang-0.7.6.tar.gz.

File metadata

  • Download URL: fang-0.7.6.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fang-0.7.6.tar.gz
Algorithm Hash digest
SHA256 76b7b3e99bf31264106f19701eb0909669c6bfaca9c8604e5192e73baa5b258d
MD5 1b719fea386ec61cd53a96d329672377
BLAKE2b-256 eb2156c0f8812c249e80b8c7e80f23bc38181a53c9a97a5b73a6040b52c57edf

See more details on using hashes here.

File details

Details for the file fang-0.7.6-py34-none-any.whl.

File metadata

File hashes

Hashes for fang-0.7.6-py34-none-any.whl
Algorithm Hash digest
SHA256 d1a2c2eee1970bd26edb00ce6050cb0c98654342b0abbc139eb2f2be902335ee
MD5 287e5587bfc9beed0b9f00141db2bbfe
BLAKE2b-256 f33ae685ed2e8ebf447e5748d249f687dc62262f5aefac9e7e201895deb0e816

See more details on using hashes here.

Supported by

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