--- id: uncalled-for version: "0.4.0" license: # Released under MIT License Copyright (c) 2025 Chris Guidry. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) license_treatment: permissive maintenance: active --- # uncalled-for — Async dependency injection for Python functions License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install uncalled-for uv add uncalled-for poetry add uncalled-for ## Description # uncalled-for Async dependency injection for Python functions. Declare what your function needs as parameter defaults. They show up resolved when the function runs. No ceremony, no container, no configuration. ```python from uncalled_for import Depends async def get_db(): db = await connect() try: yield db finally: await db.close() async def handle_request(db: Connection = Depends(get_db)): await db.execute("SELECT 1") ``` ## Features - **Zero dependencies** — standard library only - **Async-native** — built on `AsyncExitStack` and `ContextVar` - **Context manager lifecycle** — sync and async generators get proper cleanup - **Nested dependencies** — dependencies can depend on other dependencies - **Caching** — each dependency resolves once per call, even if referenced multiple times - **Call arguments** — a factory can reference the arguments of the call it serves ## Call arguments A factory sometimes needs a value from the call itself, not from another dependency. `CallArgument` declares that reference: ```python from uncalled_for import CallArgument, Depends def load_user(user_id: str = CallArgument()) -> User: return... ## AI interpretation — verify before relying Async dependency injection for Python functions using parameter defaults, with zero external dependencies and built-in support for context manager lifecycles and nested dependency resolution. Verdict: A lightweight, actively maintained async dependency injection library with zero external dependencies and permissive MIT licensing. Best suited for async Python projects needing declarative dependency resolution; Alpha status and small community (15 stars) suggest evaluating for production use with caution. [View on SkillFed](https://skillfed.io/packages/uncalled-for) · [View on PyPI](https://pypi.org/project/uncalled-for/)