$npx skillfedfor your agent

typer-injector

Dependency injection for typer

With conditionsPyPI Application FrameworksReleased Apr 2026102.9K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — typer_injector-0.3.0-py3-none-any.whl
v0.3.0 · released 2026-04-29 · Python >=3.9 · 1 runtime deps: typer

Yes, if you're building a Typer CLI with multiple commands that share parameters or need centralized dependency logic. The package is actively maintained, has low install friction, carries no security vulnerabilities, and uses a permissive MIT license. Start with it if you're already using Typer and find yourself repeating option definitions across commands.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction installation with a single runtime dependency on typer.
  • Actively maintained with recent commits and broad Python version support from 3.9 through 3.14.

License · maintenance · safety

MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2026-04-29 (107 days) · last repo commit 2026-04-29 · 1 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 102,870 downloads/mo, #12,839 on PyPI

Verify before relying

pip install typer-injector

import typer
from typer_injector import Depends, InjectingTyper
from typing import Annotated

app = InjectingTyper()

def my_dependency(value: str) -> str:
    return value.upper()

Dep = Annotated[str, Depends(my_dependency)]

@app.command()
def my_command(dep: Dep) -> None:
    print(dep)
  • Whether dependency caching or lifecycle management (request-scoped, singleton, etc.) is supported beyond the FastAPI pattern.
  • Performance characteristics when many commands share complex dependency graphs.
  • Compatibility with Typer's async command support.
Same gist for agents: .md · .json

What it is and what it does

typer-injector bridges Typer CLI applications with FastAPI-style dependency injection, letting you define reusable parameter factories and inject them into commands via type annotations. Instead of repeating the same option parsing logic across multiple commands, you write a dependency function once and reference it by annotating parameters with Depends().

The package wraps Typer's InjectingTyper class and works with Typer's Option and Argument annotations. It's useful when your CLI has multiple commands that share common parameters—like database connections, configuration objects, or parsed composite arguments—that you want to define and validate in one place. The dependency system resolves these at command invocation time, similar to how FastAPI resolves dependencies for route handlers.

Use it for

  • Share parsed configuration (host, port, credentials) across multiple CLI commands without repeating option definitions.
  • Build composite parameters from multiple CLI options—e.g., combine host and port into an Address tuple for reuse.
  • Centralize validation logic for common parameter types across a multi-command CLI tool.
  • Reduce boilerplate in CLI tools with many commands that accept overlapping sets of options.
  • Organize CLI parameter handling using dependency injection patterns familiar from web frameworks.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you're building a Typer CLI with multiple commands that share parameters or need centralized dependency logic.

The package is actively maintained, has low install friction, carries no security vulnerabilities, and uses a permissive MIT license. Start with it if you're already using Typer and find yourself repeating option definitions across commands.

Install

typer-injector on PyPI

Before you install

Low friction installation with a single runtime dependency on typer. Actively maintained with recent commits and broad Python version support from 3.9 through 3.14.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install typer-injector

import typer
from typer_injector import Depends, InjectingTyper
from typing import Annotated

app = InjectingTyper()

def my_dependency(value: str) -> str:
    return value.upper()

Dep = Annotated[str, Depends(my_dependency)]

@app.command()
def my_command(dep: Dep) -> None:
    print(dep)

Verify before relying

  • Whether dependency caching or lifecycle management (request-scoped, singleton, etc.) is supported beyond the FastAPI pattern.
  • Performance characteristics when many commands share complex dependency graphs.
  • Compatibility with Typer's async command support.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
typer
MaintenanceActively maintained 107 days since the last release
Last repo commit
First released
Downloads102,870 / month, #12,839 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Evidence: typer_injector-0.3.0-py3-none-any.whl

Tags

Capabilities
typer dependency injectioncli dependency managementtyper command parametersfastapi-style cli injectionreusable cli dependenciestyper parameter sharingcli argument composition
Topics
cli-frameworkdependency-injectiontyper

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “typer dependency injection”

  • typer-injectorAdds FastAPI-style dependency injection to Typer CLI applications,…
  • wireupWireup is a type-driven dependency injection container for Python…
  • typer-slimtyper-slim is a deprecated migration shim that installs the full…

Give your agent the search over MCP, or paste the wish link into any chat.

More Application Frameworks packages

fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
textual Worth it
PyPI · Application Frameworks · released Jun 2026

Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.

Install it if you're developing CLI tools, dashboards, or interactive terminal applications.

MITpure Python
443.6Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
mcp Worth it
PyPI · Application Frameworks · released Jul 2026

Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.

Install it if you need to build or connect to servers.

MITpure Python · 3.10+
319.3Mdownloads / mo
Werkzeug Worth it
PyPI · Application Frameworks · released Apr 2026

Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.

BSD-3-Clausepure Python · 3.9+
268.1Mdownloads / mo

See also fastapi-injectable · typer-cli · typer-config · typer-slim · taskiq-dependencies · sphinxcontrib-typer · fast-depends · django-typer · injector