Skip to main content

FunDI logo

# FunDI

Solution for problem no one had before

Fun stays for function(or for fun if you wish) and DI for Dependency Injection

This library provides fast(to write!) and convenient(to use!) Dependency Injection for functional programming on python.

Why?

This library was inspired by FastAPI's dependency injection. The reasons for its existence are simple:

  • A standalone dependency injection library. DI shouldn't be tied to a specific framework.
  • It simplifies code writing. Dependency injection reduces boilerplate and improves maintainability.
  • Lack of DI libraries for functional programming in Python. Or maybe I just didn't want to find one :3

No more words, let's try!

from fundi import scan, from_, inject


def require_user():
    return "Alice"


def greet(user: str = from_(require_user)):
    print(f"Hello, {user}!")


inject({}, scan(greet))

See the documentation to get more examples: https://fundi.readthedocs.io/en/stable/

Metadata

Release files for fundi 1.6.2

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

Source distribution (sdist)

Source distribution for fundi 1.6.2
File Size Uploaded Provenance
fundi-1.6.2.tar.gz 24.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fundi 1.6.2
File Interpreter ABI Platform
fundi-1.6.2-py3-none-any.whl Python 3 none any Details

Total release size: 56.7 kB

Release files / fundi-1.6.2.tar.gz

Download URL fundi-1.6.2.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
148115252f55ba324159bfc2690d65febbf9d7ea9317077de1459450da875cb2
BLAKE2b-256 checksum
How to use checksums
b33d8c3355154e526d3688fe1ecacdf524348fe25ed8ab3973afeae65c34cefa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fundi-1.6.2-py3-none-any.whl

Download URL fundi-1.6.2-py3-none-any.whl
Size 32.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
022dbecf940c829efc5ba2da3a16a39762a00be96511a6db2a38ac4e3cc2be86
BLAKE2b-256 checksum
How to use checksums
7add10a29769e86c3bf4c0f1b5cf667a550037493fa34e835c7502be21a9b7a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fundi 1.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.6.2 This release

2 release files No provenance

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