Registry / web-framework / in-n-out

in-n-out

JSON →
library0.2.1pypypi✓ verified 82d ago

A plugable dependency injection and result processing library for Python. Current version 0.2.1, released June 2025. Active development with monthly releases.

pip install in-n-out
INSTALL
IMPORT
SIG · IN-N-OUT
I
in-n-out
web-frameworkpythonv0.2.1
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Store
from in_n_out import Store
from in_n_out import Injector
inject
from in_n_out import inject
provide
from in_n_out import provide

Simple dependency injection and result processing example.

from in_n_out import Injector, Processor, intake class MyService: def greet(self, name: str) -> str: return f"Hello, {name}!" injector = Injector() processor = Processor() @injector.register @processor.register def my_function(name: str) -> str: service = MyService() return service.greet(name) result = processor.process(my_function, name="World") print(result)
Debug
Known issues
deprecatedThe `register` decorator with both Injector and Processor on the same function is deprecated; use `@injector.register` and `@processor.register` separately.
fix
Decorate the function twice, once per instance.
affects: 0.2.0+
gotchaProcessor returns a coroutine object if the function is async; you must await it.
fix
Use `await processor.process(...)` for async functions.
affects: all
breakingBefore v0.2.0, the `inject` decorator existed; it was removed and replaced with `Injector.register`.
fix
Upgrade to 0.2.x and use `Injector.register`.
affects: <=0.1.x
Upgrade
Version history
0.2.1latest on PyPI · released Apr 22, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
in-n-out — pip install in-n-out · libregistry