Skip to main content

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.

Release files for fang 0.7.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fang 0.7.6
File Size Uploaded
fang-0.7.6.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fang 0.7.6
File Interpreter ABI Platform
fang-0.7.6-py34-none-any.whl Python 3.4 none any Details

Total release size: 13.1 kB

Release files / fang-0.7.6.tar.gz

Download URL fang-0.7.6.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
76b7b3e99bf31264106f19701eb0909669c6bfaca9c8604e5192e73baa5b258d
BLAKE2b-256 checksum
How to use checksums
eb2156c0f8812c249e80b8c7e80f23bc38181a53c9a97a5b73a6040b52c57edf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / fang-0.7.6-py34-none-any.whl

Download URL fang-0.7.6-py34-none-any.whl
Size 6.9 kB
Tags Python 3.4
SHA-256 checksum
How to use checksums
d1a2c2eee1970bd26edb00ce6050cb0c98654342b0abbc139eb2f2be902335ee
BLAKE2b-256 checksum
How to use checksums
f33ae685ed2e8ebf447e5748d249f687dc62262f5aefac9e7e201895deb0e816
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.7.6 This release

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page