pico-ioc 2.0.0__tar.gz → 2.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pico_ioc-2.0.1/CHANGELOG.md +97 -0
- pico_ioc-2.0.1/PKG-INFO +243 -0
- pico_ioc-2.0.1/README.md +193 -0
- pico_ioc-2.0.1/docs/README.md +89 -0
- pico_ioc-2.0.1/docs/adr/README.md +15 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/adr/adr-0001-async-native.md +0 -1
- pico_ioc-2.0.1/docs/adr/adr-0003-context-aware-scopes.md +39 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/adr/adr-0004-observability.md +10 -7
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/adr/adr-0005-aop.md +0 -1
- pico_ioc-2.0.1/docs/adr/adr-0006-eager-validation.md +32 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/adr/adr-0007-event_bus.md +0 -1
- pico_ioc-2.0.1/docs/adr/adr-0008-circular-dependencies.md +34 -0
- pico_ioc-2.0.1/docs/adr/adr-0009-flexible-provides.md +85 -0
- pico_ioc-2.0.1/docs/advanced-features/README.md +21 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/advanced-features/conditional-binding.md +32 -36
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/advanced-features/event-bus.md +84 -44
- pico_ioc-2.0.1/docs/api-reference/README.md +19 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/api-reference/container.md +19 -17
- pico_ioc-2.0.1/docs/api-reference/decorators.md +95 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/api-reference/glossary.md +1 -2
- pico_ioc-2.0.1/docs/architecture/README.md +23 -0
- pico_ioc-2.0.1/docs/architecture/comparison.md +114 -0
- pico_ioc-2.0.1/docs/architecture/design-principles.md +97 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/architecture/internals.md +36 -7
- pico_ioc-2.0.1/docs/cookbook/README.md +24 -0
- pico_ioc-2.0.1/docs/cookbook/pattern-aop-security.md +369 -0
- pico_ioc-2.0.1/docs/cookbook/pattern-aop-structured-logging.md +289 -0
- pico_ioc-2.0.1/docs/integrations/README.md +19 -0
- pico_ioc-2.0.1/docs/integrations/ai-langchain.md +293 -0
- pico_ioc-2.0.1/docs/integrations/web-fastapi.md +231 -0
- pico_ioc-2.0.1/docs/integrations/web-flask.md +253 -0
- pico_ioc-2.0.1/docs/observability/README.md +21 -0
- pico_ioc-2.0.1/docs/observability/exporting-graph.md +144 -0
- pico_ioc-2.0.1/docs/overview.md +241 -0
- pico_ioc-2.0.1/docs/user-guide/README.md +22 -0
- pico_ioc-2.0.1/docs/user-guide/configuration-basic.md +63 -0
- pico_ioc-2.0.1/docs/user-guide/configuration-binding.md +155 -0
- pico_ioc-2.0.1/docs/user-guide/core-concepts.md +199 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/user-guide/qualifiers-lists.md +21 -23
- pico_ioc-2.0.1/docs/user-guide/scopes-lifecycle.md +281 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/user-guide/testing.md +58 -48
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/pyproject.toml +5 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc/__init__.py +1 -12
- pico_ioc-2.0.1/src/pico_ioc/_version.py +1 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc/aop.py +55 -21
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc/api.py +464 -108
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc/container.py +161 -26
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc/event_bus.py +3 -4
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc/exceptions.py +9 -3
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc/scope.py +47 -2
- pico_ioc-2.0.1/src/pico_ioc.egg-info/PKG-INFO +243 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc.egg-info/SOURCES.txt +10 -4
- pico_ioc-2.0.1/src/pico_ioc.egg-info/requires.txt +6 -0
- pico_ioc-2.0.1/test.txt +1272 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/tests/test_configured.py +0 -4
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/tests/test_container_runtime.py +12 -20
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/tests/test_pico_extends.py +171 -80
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/tests/test_pico_integration.py +43 -36
- pico_ioc-2.0.1/tests/test_provides_module_functions.py +96 -0
- pico_ioc-2.0.1/tests/test_provides_static_methods.py +39 -0
- pico_ioc-2.0.1/tests/test_resolution_graph.py +63 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/tox.ini +2 -0
- pico_ioc-2.0.0/CHANGELOG.md +0 -140
- pico_ioc-2.0.0/PKG-INFO +0 -230
- pico_ioc-2.0.0/README.md +0 -184
- pico_ioc-2.0.0/docs/DECISIONS.md +0 -156
- pico_ioc-2.0.0/docs/README.md +0 -96
- pico_ioc-2.0.0/docs/adr/README.md +0 -8
- pico_ioc-2.0.0/docs/adr/adr-0003-context-aware-scopes.md +0 -32
- pico_ioc-2.0.0/docs/adr/adr-0006-eager-validation.md +0 -29
- pico_ioc-2.0.0/docs/advanced-features/README.md +0 -66
- pico_ioc-2.0.0/docs/api-reference/README.md +0 -36
- pico_ioc-2.0.0/docs/api-reference/decorators.md +0 -127
- pico_ioc-2.0.0/docs/architecture/README.md +0 -47
- pico_ioc-2.0.0/docs/architecture/comparison.md +0 -111
- pico_ioc-2.0.0/docs/architecture/design-principles.md +0 -83
- pico_ioc-2.0.0/docs/architecture.md +0 -160
- pico_ioc-2.0.0/docs/cookbook/README.md +0 -41
- pico_ioc-2.0.0/docs/cookbook/pattern-aop-security.md +0 -298
- pico_ioc-2.0.0/docs/cookbook/pattern-aop-structured-logging.md +0 -230
- pico_ioc-2.0.0/docs/guide.md +0 -416
- pico_ioc-2.0.0/docs/integrations/README.md +0 -51
- pico_ioc-2.0.0/docs/integrations/ai-langchain.md +0 -187
- pico_ioc-2.0.0/docs/integrations/web-fastapi.md +0 -185
- pico_ioc-2.0.0/docs/integrations/web-flask.md +0 -195
- pico_ioc-2.0.0/docs/observability/README.md +0 -54
- pico_ioc-2.0.0/docs/observability/exporting-graph.md +0 -117
- pico_ioc-2.0.0/docs/overview.md +0 -80
- pico_ioc-2.0.0/docs/user-guide/configuration-basic.md +0 -200
- pico_ioc-2.0.0/docs/user-guide/configuration-binding.md +0 -530
- pico_ioc-2.0.0/docs/user-guide/core-concepts.md +0 -170
- pico_ioc-2.0.0/src/pico_ioc/_version.py +0 -1
- pico_ioc-2.0.0/src/pico_ioc.egg-info/PKG-INFO +0 -230
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/.coveragerc +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/.github/workflows/ci.yml +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/.github/workflows/publish-to-pypi.yml +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/LICENSE +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/MANIFEST.in +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/adr/adr-0002-tree-based-configuration.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/advanced-features/aop-interceptors.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/advanced-features/async-resolution.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/advanced-features/health-checks.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/api-reference/protocols.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/cookbook/pattern-aop-feature-toggle.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/cookbook/pattern-aop-profiling.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/cookbook/pattern-cli-app.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/cookbook/pattern-cqrs.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/cookbook/pattern-dynamic-langchain.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/cookbook/pattern-hot-reload.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/cookbook/pattern-multi-tenant.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/getting-started.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/integrations/web-django.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/observability/container-context.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/docs/observability/observers-metrics.md +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/setup.cfg +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc/config_runtime.py +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc/constants.py +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc/factory.py +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc/locator.py +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc.egg-info/dependency_links.txt +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/src/pico_ioc.egg-info/top_level.txt +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/tests/test_container_context.py +0 -0
- {pico_ioc-2.0.0 → pico_ioc-2.0.1}/tests/test_event_bus.py +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.html).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [2.0.0] - 2025-10-23
|
|
11
|
+
|
|
12
|
+
This version marks a significant redesign and the first major public release, establishing the core architecture and feature set based on the principles outlined in the Architecture Decision Records (ADRs).
|
|
13
|
+
|
|
14
|
+
### 🚀 Highlights
|
|
15
|
+
|
|
16
|
+
* **Async-Native Core:** Introduced first-class `async`/`await` support across component resolution (`container.aget`), initialization (`__ainit__`), lifecycle hooks (`@configure`, `@cleanup`), AOP interceptors, and the event bus (ADR-001).
|
|
17
|
+
* **Tree-Based Configuration:** Added `@configured` decorator and `TreeSource` protocol for binding complex, nested configuration (YAML/JSON) to dataclass graphs, including interpolation and type coercion (ADR-002).
|
|
18
|
+
* **Context-Aware Scopes:** Implemented `contextvars`-based scopes (e.g., `"request"`, `"session"`) for managing component lifecycles tied to specific contexts (ADR-003).
|
|
19
|
+
* **Observability Features:** Integrated container context (`container_id`, `as_current`), basic stats (`container.stats()`), observer protocol (`ContainerObserver`), and dependency graph export (`container.export_graph()`) (ADR-004).
|
|
20
|
+
* **Aspect-Oriented Programming (AOP):** Implemented method interception via `MethodInterceptor` protocol and `@intercepted_by` decorator, using a dynamic proxy (`UnifiedComponentProxy`) (ADR-005).
|
|
21
|
+
* **Eager Startup Validation:** Added fail-fast validation during `init()` to detect missing dependencies and configuration errors before runtime (ADR-006).
|
|
22
|
+
* **Built-in Event Bus:** Included an asynchronous, in-process event bus (`EventBus`, `@subscribe`, `AutoSubscriberMixin`) for decoupled communication (ADR-007).
|
|
23
|
+
* **Explicit Circular Dependency Handling:** Implemented detection and fail-fast for circular dependencies, requiring explicit resolution patterns (ADR-008).
|
|
24
|
+
* **Unified Decorator API:** Consolidated component metadata into parameterized decorators (`@component`, `@factory`, `@provides`), removing older stacked decorators (ADR-009).
|
|
25
|
+
|
|
26
|
+
### ✨ Added
|
|
27
|
+
|
|
28
|
+
* Core registration decorators: `@component`, `@factory`, `@provides`.
|
|
29
|
+
* Configuration decorators: `@configuration` (flat key-value) and `@configured` (tree-based).
|
|
30
|
+
* Lifecycle decorators: `@configure`, `@cleanup`.
|
|
31
|
+
* AOP decorator: `@intercepted_by`.
|
|
32
|
+
* Event bus decorator: `@subscribe`.
|
|
33
|
+
* Health check decorator: `@health`.
|
|
34
|
+
* Async resolution: `container.aget()` and `__ainit__` convention.
|
|
35
|
+
* Async cleanup: `container.cleanup_all_async()`.
|
|
36
|
+
* Qualifier support (`Qualifier` class) for list injection (`Annotated[List[Type], Qualifier(...)]`).
|
|
37
|
+
* Support for `lazy=True` parameter for deferred component instantiation.
|
|
38
|
+
* Conditional binding parameters (`conditional_profiles`, `conditional_require_env`, `conditional_predicate`).
|
|
39
|
+
* Fallback binding parameters (`on_missing_selector`, `on_missing_priority`).
|
|
40
|
+
* Primary selection parameter (`primary=True`).
|
|
41
|
+
* Testing support via `init(overrides={...})` and `init(profiles=(...))`.
|
|
42
|
+
* Container context management (`as_current`, `get_current`, `shutdown`, `all_containers`).
|
|
43
|
+
* Scope management API (`activate_scope`, `deactivate_scope`, `scope` context manager).
|
|
44
|
+
* Configuration sources: `EnvSource`, `FileSource` (flat); `JsonTreeSource`, `YamlTreeSource`, `DictSource` (tree).
|
|
45
|
+
* Protocols for extension: `MethodInterceptor`, `ContainerObserver`, `ScopeProtocol`, `ConfigSource`, `TreeSource`.
|
|
46
|
+
|
|
47
|
+
### ⚠️ Breaking Changes
|
|
48
|
+
|
|
49
|
+
* Complete redesign compared to any prior internal/unreleased versions. APIs are not backward compatible.
|
|
50
|
+
* Requires Python 3.10+.
|
|
51
|
+
|
|
52
|
+
### 📚 Docs
|
|
53
|
+
|
|
54
|
+
* Established new documentation structure including ADRs, Architecture, User Guide, Advanced Features, Cookbook, Integrations, and API Reference.
|
|
55
|
+
|
|
56
|
+
### 🧪 Testing
|
|
57
|
+
|
|
58
|
+
* Added comprehensive test suite covering core features, async behavior, AOP, configuration, scopes, and error handling.
|
|
59
|
+
* Introduced patterns for testing with overrides and profiles.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## [2.0.1] - 2025-10-25
|
|
64
|
+
|
|
65
|
+
### Added ✨
|
|
66
|
+
|
|
67
|
+
- **ADR-0009: Flexible `@provides` Support**
|
|
68
|
+
Implemented support for using `@provides` in additional contexts:
|
|
69
|
+
- `@staticmethod` methods within `@factory` classes
|
|
70
|
+
- `@classmethod` methods within `@factory` classes
|
|
71
|
+
- Module-level functions
|
|
72
|
+
These new provider types are discovered automatically during module scanning and participate fully in dependency resolution, validation, and graph generation.
|
|
73
|
+
|
|
74
|
+
- **Dependency Graph and Validation Enhancements**
|
|
75
|
+
- `_build_resolution_graph` now includes edges for all `@provides` functions, regardless of where they are defined.
|
|
76
|
+
- Fail-fast validation checks now cover static/class/module-level providers, reporting missing bindings consistently.
|
|
77
|
+
- Scope inference and promotion logic apply equally to these new provider types.
|
|
78
|
+
|
|
79
|
+
### Documentation 📚
|
|
80
|
+
|
|
81
|
+
- Expanded `docs/overview.md` to document the new flexible provider options (`@staticmethod`, `@classmethod`, module-level functions).
|
|
82
|
+
- Updated `docs/guide.md` with practical examples showing when to use each style of provider.
|
|
83
|
+
- Linked ADR-0009 for design rationale and migration guidance.
|
|
84
|
+
|
|
85
|
+
### Notes 📝
|
|
86
|
+
|
|
87
|
+
- This is a **minor feature release** introducing a major ergonomics improvement (ADR-0009).
|
|
88
|
+
- Fully backward compatible with existing factories, components, and configuration mechanisms.
|
|
89
|
+
- Encourages a lighter, more Pythonic style for simple provider declarations.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## [<2.0.0]
|
|
95
|
+
|
|
96
|
+
* Internal development and prototyping phase. Basic dependency injection concepts established. Architecture significantly reworked for the v2.0.0 release.
|
|
97
|
+
|
pico_ioc-2.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pico-ioc
|
|
3
|
+
Version: 2.0.1
|
|
4
|
+
Summary: A minimalist, zero-dependency Inversion of Control (IoC) container for Python.
|
|
5
|
+
Author-email: David Perez Cabrera <dperezcabrera@gmail.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2025 David Pérez Cabrera
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/dperezcabrera/pico-ioc
|
|
29
|
+
Project-URL: Repository, https://github.com/dperezcabrera/pico-ioc
|
|
30
|
+
Project-URL: Issue Tracker, https://github.com/dperezcabrera/pico-ioc/issues
|
|
31
|
+
Keywords: ioc,di,dependency injection,inversion of control,decorator
|
|
32
|
+
Classifier: Development Status :: 4 - Beta
|
|
33
|
+
Classifier: Programming Language :: Python :: 3
|
|
34
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
40
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
41
|
+
Classifier: Operating System :: OS Independent
|
|
42
|
+
Requires-Python: >=3.8
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
License-File: LICENSE
|
|
45
|
+
Provides-Extra: yaml
|
|
46
|
+
Requires-Dist: PyYAML; extra == "yaml"
|
|
47
|
+
Provides-Extra: graphviz
|
|
48
|
+
Requires-Dist: graphviz; extra == "graphviz"
|
|
49
|
+
Dynamic: license-file
|
|
50
|
+
|
|
51
|
+
# 📦 Pico-IoC: A Robust, Async-Native IoC Container for Python
|
|
52
|
+
|
|
53
|
+
[](https://pypi.org/project/pico-ioc/)
|
|
54
|
+
[](https://deepwiki.com/dperezcabrera/pico-ioc)
|
|
55
|
+
[](https://opensource.org/licenses/MIT)
|
|
56
|
+

|
|
57
|
+
[](https://codecov.io/gh/dperezcabrera/pico-ioc)
|
|
58
|
+
[](https://sonarcloud.io/summary/new_code?id=dperezcabrera_pico-ioc)
|
|
59
|
+
[](https://sonarcloud.io/summary/new_code?id=dperezcabrera_pico-ioc)
|
|
60
|
+
[](https://sonarcloud.io/summary/new_code?id=dperezcabrera_pico-ioc)
|
|
61
|
+
|
|
62
|
+
**Pico-IoC** is a **lightweight, async-ready, decorator-driven IoC container** built for clarity, testability, and performance.
|
|
63
|
+
It brings *Inversion of Control* and *dependency injection* to Python in a deterministic, modern, and framework-agnostic way.
|
|
64
|
+
|
|
65
|
+
> 🐍 Requires **Python 3.10+**
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## ⚖️ Core Principles
|
|
70
|
+
|
|
71
|
+
- **Single Purpose** – Do one thing: dependency management.
|
|
72
|
+
- **Declarative** – Use simple decorators (`@component`, `@factory`, `@configuration`) instead of config files or YAML magic.
|
|
73
|
+
- **Deterministic** – No hidden scanning or side-effects; everything flows from an explicit `init()`.
|
|
74
|
+
- **Async-Native** – Fully supports async providers, async lifecycle hooks, and async interceptors.
|
|
75
|
+
- **Fail-Fast** – Detects missing bindings and circular dependencies at bootstrap.
|
|
76
|
+
- **Testable by Design** – Use `overrides` and `profiles` to swap components instantly.
|
|
77
|
+
- **Zero Core Dependencies** – Built entirely on the Python standard library. Optional features may require external packages (see Installation).
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 🚀 Why Pico-IoC?
|
|
82
|
+
|
|
83
|
+
As Python systems evolve, wiring dependencies by hand becomes fragile and unmaintainable.
|
|
84
|
+
**Pico-IoC** eliminates that friction by letting you declare how components relate — not how they’re created.
|
|
85
|
+
|
|
86
|
+
| Feature | Manual Wiring | With Pico-IoC |
|
|
87
|
+
| :------------- | :------------------------- | :------------------------------ |
|
|
88
|
+
| Object creation| `svc = Service(Repo(Config()))` | `svc = container.get(Service)` |
|
|
89
|
+
| Replacing deps | Monkey-patch | `overrides={Repo: FakeRepo()}` |
|
|
90
|
+
| Coupling | Tight | Loose |
|
|
91
|
+
| Testing | Painful | Instant |
|
|
92
|
+
| Async support | Manual | Built-in |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 🧩 Highlights (v2.0.0)
|
|
97
|
+
|
|
98
|
+
- **Full redesign:** unified architecture with simpler, more powerful APIs.
|
|
99
|
+
- **Async-aware AOP system** — method interceptors via `@intercepted_by`.
|
|
100
|
+
- **Typed configuration** — dataclasses with JSON/YAML/env sources.
|
|
101
|
+
- **Scoped resolution** — singleton, prototype, request, session, transaction.
|
|
102
|
+
- **UnifiedComponentProxy** — transparent lazy/AOP proxy supporting serialization.
|
|
103
|
+
- **Tree-based configuration runtime** with reusable adapters and discriminators.
|
|
104
|
+
- **Observable container context** with stats, health checks, and async cleanup.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 📦 Installation
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pip install pico-ioc
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
For optional features, you can install extras:
|
|
115
|
+
|
|
116
|
+
* **YAML Configuration:**
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
pip install pico-ioc[yaml]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
(Requires `PyYAML`)
|
|
123
|
+
|
|
124
|
+
* **Dependency Graph Export:**
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
pip install pico-ioc[graphviz]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
(Requires the `graphviz` Python package and the Graphviz command-line tools)
|
|
131
|
+
|
|
132
|
+
-----
|
|
133
|
+
|
|
134
|
+
## ⚙️ Quick Example
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
from dataclasses import dataclass
|
|
138
|
+
from pico_ioc import component, configuration, init
|
|
139
|
+
|
|
140
|
+
@configuration
|
|
141
|
+
@dataclass
|
|
142
|
+
class Config:
|
|
143
|
+
db_url: str = "sqlite:///demo.db"
|
|
144
|
+
|
|
145
|
+
@component
|
|
146
|
+
class Repo:
|
|
147
|
+
def __init__(self, cfg: Config):
|
|
148
|
+
self.cfg = cfg
|
|
149
|
+
def fetch(self):
|
|
150
|
+
return f"fetching from {self.cfg.db_url}"
|
|
151
|
+
|
|
152
|
+
@component
|
|
153
|
+
class Service:
|
|
154
|
+
def __init__(self, repo: Repo):
|
|
155
|
+
self.repo = repo
|
|
156
|
+
def run(self):
|
|
157
|
+
return self.repo.fetch()
|
|
158
|
+
|
|
159
|
+
container = init(modules=[__name__])
|
|
160
|
+
svc = container.get(Service)
|
|
161
|
+
print(svc.run())
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Output:**
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
fetching from sqlite:///demo.db
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
-----
|
|
171
|
+
|
|
172
|
+
## 🧪 Testing with Overrides
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
class FakeRepo:
|
|
176
|
+
def fetch(self): return "fake-data"
|
|
177
|
+
|
|
178
|
+
container = init(modules=[__name__], overrides={Repo: FakeRepo()})
|
|
179
|
+
svc = container.get(Service)
|
|
180
|
+
assert svc.run() == "fake-data"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
-----
|
|
184
|
+
|
|
185
|
+
## 🩺 Lifecycle & AOP
|
|
186
|
+
|
|
187
|
+
```python
|
|
188
|
+
from pico_ioc import intercepted_by, MethodInterceptor, MethodCtx
|
|
189
|
+
|
|
190
|
+
class LogInterceptor(MethodInterceptor):
|
|
191
|
+
def invoke(self, ctx: MethodCtx, call_next):
|
|
192
|
+
print(f"→ calling {ctx.name}")
|
|
193
|
+
res = call_next(ctx)
|
|
194
|
+
print(f"← {ctx.name} done")
|
|
195
|
+
return res
|
|
196
|
+
|
|
197
|
+
@component
|
|
198
|
+
class Demo:
|
|
199
|
+
@intercepted_by(LogInterceptor)
|
|
200
|
+
def work(self):
|
|
201
|
+
return "ok"
|
|
202
|
+
|
|
203
|
+
c = init(modules=[__name__])
|
|
204
|
+
c.get(Demo).work()
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
-----
|
|
208
|
+
|
|
209
|
+
## 📖 Documentation
|
|
210
|
+
|
|
211
|
+
The full documentation is available within the `docs/` directory of the project repository. Start with `docs/README.md` for navigation.
|
|
212
|
+
|
|
213
|
+
* **Getting Started:** `docs/getting-started.md`
|
|
214
|
+
* **User Guide:** `docs/user-guide/README.md`
|
|
215
|
+
* **Advanced Features:** `docs/advanced-features/README.md`
|
|
216
|
+
* **Observability:** `docs/observability/README.md`
|
|
217
|
+
* **Integrations:** `docs/integrations/README.md`
|
|
218
|
+
* **Cookbook (Patterns):** `docs/cookbook/README.md`
|
|
219
|
+
* **Architecture:** `docs/architecture/README.md`
|
|
220
|
+
* **API Reference:** `docs/api-reference/README.md`
|
|
221
|
+
* **ADR Index:** `docs/adr/README.md`
|
|
222
|
+
|
|
223
|
+
-----
|
|
224
|
+
|
|
225
|
+
## 🧩 Development
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
pip install tox
|
|
229
|
+
tox
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
-----
|
|
233
|
+
|
|
234
|
+
## 🧾 Changelog
|
|
235
|
+
|
|
236
|
+
See [CHANGELOG.md](./CHANGELOG.md) — *Full redesign for v2.0.0.*
|
|
237
|
+
|
|
238
|
+
-----
|
|
239
|
+
|
|
240
|
+
## 📜 License
|
|
241
|
+
|
|
242
|
+
MIT — [LICENSE](https://opensource.org/licenses/MIT)
|
|
243
|
+
|
pico_ioc-2.0.1/README.md
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# 📦 Pico-IoC: A Robust, Async-Native IoC Container for Python
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/pico-ioc/)
|
|
4
|
+
[](https://deepwiki.com/dperezcabrera/pico-ioc)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+

|
|
7
|
+
[](https://codecov.io/gh/dperezcabrera/pico-ioc)
|
|
8
|
+
[](https://sonarcloud.io/summary/new_code?id=dperezcabrera_pico-ioc)
|
|
9
|
+
[](https://sonarcloud.io/summary/new_code?id=dperezcabrera_pico-ioc)
|
|
10
|
+
[](https://sonarcloud.io/summary/new_code?id=dperezcabrera_pico-ioc)
|
|
11
|
+
|
|
12
|
+
**Pico-IoC** is a **lightweight, async-ready, decorator-driven IoC container** built for clarity, testability, and performance.
|
|
13
|
+
It brings *Inversion of Control* and *dependency injection* to Python in a deterministic, modern, and framework-agnostic way.
|
|
14
|
+
|
|
15
|
+
> 🐍 Requires **Python 3.10+**
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ⚖️ Core Principles
|
|
20
|
+
|
|
21
|
+
- **Single Purpose** – Do one thing: dependency management.
|
|
22
|
+
- **Declarative** – Use simple decorators (`@component`, `@factory`, `@configuration`) instead of config files or YAML magic.
|
|
23
|
+
- **Deterministic** – No hidden scanning or side-effects; everything flows from an explicit `init()`.
|
|
24
|
+
- **Async-Native** – Fully supports async providers, async lifecycle hooks, and async interceptors.
|
|
25
|
+
- **Fail-Fast** – Detects missing bindings and circular dependencies at bootstrap.
|
|
26
|
+
- **Testable by Design** – Use `overrides` and `profiles` to swap components instantly.
|
|
27
|
+
- **Zero Core Dependencies** – Built entirely on the Python standard library. Optional features may require external packages (see Installation).
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 🚀 Why Pico-IoC?
|
|
32
|
+
|
|
33
|
+
As Python systems evolve, wiring dependencies by hand becomes fragile and unmaintainable.
|
|
34
|
+
**Pico-IoC** eliminates that friction by letting you declare how components relate — not how they’re created.
|
|
35
|
+
|
|
36
|
+
| Feature | Manual Wiring | With Pico-IoC |
|
|
37
|
+
| :------------- | :------------------------- | :------------------------------ |
|
|
38
|
+
| Object creation| `svc = Service(Repo(Config()))` | `svc = container.get(Service)` |
|
|
39
|
+
| Replacing deps | Monkey-patch | `overrides={Repo: FakeRepo()}` |
|
|
40
|
+
| Coupling | Tight | Loose |
|
|
41
|
+
| Testing | Painful | Instant |
|
|
42
|
+
| Async support | Manual | Built-in |
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 🧩 Highlights (v2.0.0)
|
|
47
|
+
|
|
48
|
+
- **Full redesign:** unified architecture with simpler, more powerful APIs.
|
|
49
|
+
- **Async-aware AOP system** — method interceptors via `@intercepted_by`.
|
|
50
|
+
- **Typed configuration** — dataclasses with JSON/YAML/env sources.
|
|
51
|
+
- **Scoped resolution** — singleton, prototype, request, session, transaction.
|
|
52
|
+
- **UnifiedComponentProxy** — transparent lazy/AOP proxy supporting serialization.
|
|
53
|
+
- **Tree-based configuration runtime** with reusable adapters and discriminators.
|
|
54
|
+
- **Observable container context** with stats, health checks, and async cleanup.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 📦 Installation
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install pico-ioc
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
For optional features, you can install extras:
|
|
65
|
+
|
|
66
|
+
* **YAML Configuration:**
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install pico-ioc[yaml]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
(Requires `PyYAML`)
|
|
73
|
+
|
|
74
|
+
* **Dependency Graph Export:**
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install pico-ioc[graphviz]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
(Requires the `graphviz` Python package and the Graphviz command-line tools)
|
|
81
|
+
|
|
82
|
+
-----
|
|
83
|
+
|
|
84
|
+
## ⚙️ Quick Example
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
from dataclasses import dataclass
|
|
88
|
+
from pico_ioc import component, configuration, init
|
|
89
|
+
|
|
90
|
+
@configuration
|
|
91
|
+
@dataclass
|
|
92
|
+
class Config:
|
|
93
|
+
db_url: str = "sqlite:///demo.db"
|
|
94
|
+
|
|
95
|
+
@component
|
|
96
|
+
class Repo:
|
|
97
|
+
def __init__(self, cfg: Config):
|
|
98
|
+
self.cfg = cfg
|
|
99
|
+
def fetch(self):
|
|
100
|
+
return f"fetching from {self.cfg.db_url}"
|
|
101
|
+
|
|
102
|
+
@component
|
|
103
|
+
class Service:
|
|
104
|
+
def __init__(self, repo: Repo):
|
|
105
|
+
self.repo = repo
|
|
106
|
+
def run(self):
|
|
107
|
+
return self.repo.fetch()
|
|
108
|
+
|
|
109
|
+
container = init(modules=[__name__])
|
|
110
|
+
svc = container.get(Service)
|
|
111
|
+
print(svc.run())
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Output:**
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
fetching from sqlite:///demo.db
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
-----
|
|
121
|
+
|
|
122
|
+
## 🧪 Testing with Overrides
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
class FakeRepo:
|
|
126
|
+
def fetch(self): return "fake-data"
|
|
127
|
+
|
|
128
|
+
container = init(modules=[__name__], overrides={Repo: FakeRepo()})
|
|
129
|
+
svc = container.get(Service)
|
|
130
|
+
assert svc.run() == "fake-data"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
-----
|
|
134
|
+
|
|
135
|
+
## 🩺 Lifecycle & AOP
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
from pico_ioc import intercepted_by, MethodInterceptor, MethodCtx
|
|
139
|
+
|
|
140
|
+
class LogInterceptor(MethodInterceptor):
|
|
141
|
+
def invoke(self, ctx: MethodCtx, call_next):
|
|
142
|
+
print(f"→ calling {ctx.name}")
|
|
143
|
+
res = call_next(ctx)
|
|
144
|
+
print(f"← {ctx.name} done")
|
|
145
|
+
return res
|
|
146
|
+
|
|
147
|
+
@component
|
|
148
|
+
class Demo:
|
|
149
|
+
@intercepted_by(LogInterceptor)
|
|
150
|
+
def work(self):
|
|
151
|
+
return "ok"
|
|
152
|
+
|
|
153
|
+
c = init(modules=[__name__])
|
|
154
|
+
c.get(Demo).work()
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
-----
|
|
158
|
+
|
|
159
|
+
## 📖 Documentation
|
|
160
|
+
|
|
161
|
+
The full documentation is available within the `docs/` directory of the project repository. Start with `docs/README.md` for navigation.
|
|
162
|
+
|
|
163
|
+
* **Getting Started:** `docs/getting-started.md`
|
|
164
|
+
* **User Guide:** `docs/user-guide/README.md`
|
|
165
|
+
* **Advanced Features:** `docs/advanced-features/README.md`
|
|
166
|
+
* **Observability:** `docs/observability/README.md`
|
|
167
|
+
* **Integrations:** `docs/integrations/README.md`
|
|
168
|
+
* **Cookbook (Patterns):** `docs/cookbook/README.md`
|
|
169
|
+
* **Architecture:** `docs/architecture/README.md`
|
|
170
|
+
* **API Reference:** `docs/api-reference/README.md`
|
|
171
|
+
* **ADR Index:** `docs/adr/README.md`
|
|
172
|
+
|
|
173
|
+
-----
|
|
174
|
+
|
|
175
|
+
## 🧩 Development
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
pip install tox
|
|
179
|
+
tox
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
-----
|
|
183
|
+
|
|
184
|
+
## 🧾 Changelog
|
|
185
|
+
|
|
186
|
+
See [CHANGELOG.md](./CHANGELOG.md) — *Full redesign for v2.0.0.*
|
|
187
|
+
|
|
188
|
+
-----
|
|
189
|
+
|
|
190
|
+
## 📜 License
|
|
191
|
+
|
|
192
|
+
MIT — [LICENSE](https://opensource.org/licenses/MIT)
|
|
193
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Welcome to pico-ioc
|
|
2
|
+
|
|
3
|
+
`pico-ioc` is a powerful, async-native, and observability-first Inversion of Control (IoC) container for Python. It's designed to bring the power of enterprise-grade dependency injection, configuration binding, and AOP (Aspect-Oriented Programming) from frameworks like Spring into the modern Python ecosystem.
|
|
4
|
+
|
|
5
|
+
This documentation site guides you from your first component to building complex, observable, and testable applications.
|
|
6
|
+
|
|
7
|
+
## Key Features
|
|
8
|
+
|
|
9
|
+
* 🚀 **Async-Native:** Full support for `async`/`await` in component resolution (`aget`), lifecycle methods (`__ainit__`, `@cleanup`), AOP interceptors, and the Event Bus.
|
|
10
|
+
* 🌳 **Advanced Tree-Binding:** Use `@configured` to map complex YAML/JSON configuration trees directly to `dataclass` graphs, including support for `Union` types and custom discriminators.
|
|
11
|
+
* 🔬 **Observability-First:** Built-in container contexts (`as_current`), stats (`.stats()`), and observer protocols (`ContainerObserver`) to monitor, trace, and debug your application's components.
|
|
12
|
+
* ✨ **Powerful AOP:** Intercept method calls for cross-cutting concerns (like logging, tracing, or caching) using `@intercepted_by` without modifying your business logic.
|
|
13
|
+
* ✅ **Fail-Fast Validation:** The container validates all component dependencies at startup (`init()`), preventing `ProviderNotFoundError` exceptions at runtime.
|
|
14
|
+
* 🧩 **Rich Lifecycle:** Full control over component lifecycles with `scope`, `lazy` instantiation, `@configure` setup methods, and `@cleanup` teardown hooks.
|
|
15
|
+
|
|
16
|
+
## Documentation Structure
|
|
17
|
+
|
|
18
|
+
| Section | Focus | Start Here |
|
|
19
|
+
| :--- | :--- | :--- |
|
|
20
|
+
| **1. Getting Started** | Installation and 5-minute quick start. | [Quick Start](./getting-started.md) |
|
|
21
|
+
| **2. User Guide** | Core concepts, configuration, scopes, and testing. | [User Guide Overview](./user-guide/README.md) |
|
|
22
|
+
| **3. Advanced Features** | Async, AOP, Event Bus, and conditional logic. | [Advanced Features Overview](./advanced-features/README.md) |
|
|
23
|
+
| **4. Observability** | Context, metrics, tracing, and graph export. | [Observability Overview](./observability/README.md) |
|
|
24
|
+
| **5. Integrations** | FastAPI, Flask, Django, and AI/LangChain recipes. | [Integrations Overview](./integrations/README.md) |
|
|
25
|
+
| **6. Cookbook (Patterns)** | Full architectural solutions (Multi-tenant, Hot-reload, CQRS). | [Cookbook Overview](./cookbook/README.md) |
|
|
26
|
+
| **7. Architecture** | Design principles and internal deep-dive. | [Architecture Overview](./architecture/README.md) |
|
|
27
|
+
| **8. API Reference** | Glossary and decorator/method cheatsheets. | [API Reference Overview](./api-reference/README.md) |
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Overview
|
|
31
|
+
|
|
32
|
+
**Pico IOC** is a Dependency Injection (DI) container for Python that implements advanced enterprise architecture patterns. Its design is inspired by frameworks like Spring (Java) and Guice, adapted for the Python ecosystem.
|
|
33
|
+
|
|
34
|
+
It provides a robust, type-safe, and testable foundation for complex applications by managing component lifecycles, configuration, and runtime dependencies.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Core Strengths
|
|
39
|
+
|
|
40
|
+
The framework is built on specific principles:
|
|
41
|
+
|
|
42
|
+
* **Fail-Fast at Startup:** All wiring errors are detected during `init()`, preventing runtime surprises.
|
|
43
|
+
* **Async-Native:** Full integration of `async`/`await` across the resolution and lifecycle systems.
|
|
44
|
+
* **AOP and Observability:** Built-in tools for cross-cutting concerns and monitoring runtime behavior.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Getting Started: A Simple Example
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from dataclasses import dataclass
|
|
52
|
+
from pico_ioc import component, init
|
|
53
|
+
|
|
54
|
+
# 1. Define your components
|
|
55
|
+
class Greeter:
|
|
56
|
+
def say_hello(self) -> str: ...
|
|
57
|
+
|
|
58
|
+
@component
|
|
59
|
+
class EnglishGreeter(Greeter):
|
|
60
|
+
def say_hello(self) -> str:
|
|
61
|
+
return "Hello!"
|
|
62
|
+
|
|
63
|
+
@component
|
|
64
|
+
class App:
|
|
65
|
+
# 2. Declare dependencies in the constructor
|
|
66
|
+
def __init__(self, greeter: Greeter):
|
|
67
|
+
self.greeter = greeter
|
|
68
|
+
|
|
69
|
+
def run(self):
|
|
70
|
+
print(self.greeter.say_hello())
|
|
71
|
+
|
|
72
|
+
# 3. Initialize the container
|
|
73
|
+
# The 'modules' list tells pico_ioc where to scan for @component
|
|
74
|
+
container = init(modules=[__name__])
|
|
75
|
+
|
|
76
|
+
# 4. Get the root component and run
|
|
77
|
+
app = container.get(App)
|
|
78
|
+
app.run()
|
|
79
|
+
|
|
80
|
+
# Output: Hello!
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
-----
|
|
84
|
+
|
|
85
|
+
## Navigation
|
|
86
|
+
|
|
87
|
+
| [⬅️ Anterior: Inicio](./README.md) | [🏠 Índice Principal](./README.md) | [Siguiente ➡️: Guía de Usuario](./user-guide/README.md) |
|
|
88
|
+
| :--- | :--- | :--- |
|
|
89
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Architecture Decision Records (ADRs)
|
|
2
|
+
|
|
3
|
+
This index lists all significant architecture decisions for the `pico-ioc` project. Keep it sorted by ADR number.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
* [ADR-001: Native Asyncio Support](./adr-0001-async-native.md) — Accepted
|
|
8
|
+
* [ADR-002: Tree-Based Configuration](./adr-0002-tree-based-configuration.md) — Accepted
|
|
9
|
+
* [ADR-003: Context-Aware Scopes](./adr-0003-context-aware-scopes.md) — Accepted
|
|
10
|
+
* [ADR-004: Observability Features](./adr-0004-observability.md) — Accepted
|
|
11
|
+
* [ADR-005: Aspect-Oriented Programming (AOP)](./adr-0005-aop.md) — Accepted
|
|
12
|
+
* [ADR-006: Eager Validation](./adr-0006-eager-validation.md) — Accepted
|
|
13
|
+
* [ADR-007: Built-in Asynchronous Event Bus](./adr-0007-event_bus.md) — Accepted
|
|
14
|
+
* [ADR-008: Explicit Handling of Circular Dependencies](./adr-0008-circular-dependencies.md) — Accepted
|
|
15
|
+
* [ADR-009: Flexible @provides for Static and Module-level Functions](./adr-0009-flexible-provides.md) — Accepted
|
|
@@ -29,4 +29,3 @@ We decided to make `pico-ioc` **async-native**. This involved several key change
|
|
|
29
29
|
* Introduces a dual API (`get`/`aget`), requiring developers to choose the correct one based on context.
|
|
30
30
|
* Slightly increases internal complexity to manage async operations correctly.
|
|
31
31
|
* Requires users to use `container.cleanup_all_async()` instead of `cleanup_all()` if any async cleanup methods exist.
|
|
32
|
-
|