in-n-out
plugable dependency injection and result processing
Decision gist · record as of 2026-08-14
Yes, if you need lightweight dependency injection with type-hint-based resolution and minimal overhead. The permissive license, zero runtime dependencies, and active maintenance make it low-risk. However, it's still in Alpha status; evaluate whether the API is stable enough for your use case, and consider that more mature alternatives exist if you need battle-tested production guarantees.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Actively maintained as of 2026-08-03 with recent activity, though marked as Alpha status and relatively young (first released 2022-06-30).
License · maintenance · safety
BSD 3-Clause License (permissive) — BSD 3-Clause License is permissive; you can use this in commercial or proprietary projects with minimal restrictions beyond retaining the license notice.
last release 2024-04-22 (844 days) · last repo commit 2026-08-03 · 13 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 179,778 downloads/mo, #10,163 on PyPI
Alternatives
Verify before relying
import in_n_out as ino
class Thing:
def __init__(self, name: str):
self.name = name
@ino.inject
def func(thing: Thing):
return thing.name
def give_me_a_thing() -> Thing:
return Thing("Thing")
ino.register_provider(give_me_a_thing)
print(func()) # prints "Thing"- Whether the package handles circular dependencies or complex dependency graphs gracefully
- Performance characteristics under high-frequency injection scenarios
- Compatibility with async/await patterns and coroutine injection
What it is and what it does
in-n-out is a dependency injection framework that uses Python type hints to automatically resolve and provide dependencies to decorated functions. It lets you register provider functions that return instances of specific types, then mark functions with @ino.inject to have those dependencies automatically supplied at call time based on their type annotations. The framework also supports registering result processors—functions that receive and handle return values from injected functions, enabling intentional side effects.
The design emphasizes minimal code changes: you decorate functions and register providers, and the framework handles resolution at runtime. It supports weighted providers (allowing temporary overrides via context managers) and works across Python 3.8–3.12. With no runtime dependencies and low install friction, it's suitable for applications ranging from simple scripts to larger frameworks that need pluggable dependency resolution.
Use it for
- Inject database connections or configuration objects into handler functions without passing them explicitly
- Register mock providers in tests to override real dependencies without modifying source code
- Build plugin systems where different implementations of a type can be swapped at runtime
- Attach logging or monitoring processors to function results for cross-cutting concerns
- Manage service instances in web frameworks or CLI applications with dependency scoping
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need lightweight dependency injection with type-hint-based resolution and minimal overhead.
The permissive license, zero runtime dependencies, and active maintenance make it low-risk. However, it's still in Alpha status; evaluate whether the API is stable enough for your use case, and consider that more mature alternatives exist if you need battle-tested production guarantees.
Install
in-n-out on PyPI
Before you install
Low install friction with no runtime dependencies. Actively maintained as of 2026-08-03 with recent activity, though marked as Alpha status and relatively young (first released 2022-06-30).
License in practice
BSD 3-Clause License is permissive; you can use this in commercial or proprietary projects with minimal restrictions beyond retaining the license notice.
Quickstart
import in_n_out as ino
class Thing:
def __init__(self, name: str):
self.name = name
@ino.inject
def func(thing: Thing):
return thing.name
def give_me_a_thing() -> Thing:
return Thing("Thing")
ino.register_provider(give_me_a_thing)
print(func()) # prints "Thing"
Verify before relying
- Whether the package handles circular dependencies or complex dependency graphs gracefully
- Performance characteristics under high-frequency injection scenarios
- Compatibility with async/await patterns and coroutine injection
Package facts
| License | BSD 3-Clause License permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 844 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 179,778 / month, #10,163 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Typing :: Typed |
Evidence: in_n_out-0.2.1-py3-none-any.whl
Tags
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 › “type hint based DI”
- in-n-outLightweight dependency injection framework using type hints to…
- allukaAlluka is a type-based dependency injection framework that uses…
- lagomLagom is a lightweight dependency injection container that auto-wires…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
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.
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.
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.
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.
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.
See also alluka · dependency-injector · inject · simple-di · lagom · picobox · injector · gin-config · fast-depends · pinject