A package to wire up objects
Project description
apywire
Lazy object wiring and dependency injection for Python 3.12+
Features
- 🚀 Lazy Loading
- ⚡ Async Support
- 🔒 Thread Safety
- 📦 Code Generation
- 📄 Naturally Configurable
- 🎯 Zero Dependencies
Installation
pip install apywire
Quick Example
from apywire import Wiring
spec = {
"datetime.datetime now": {"year": 2025, "month": 1, "day": 1},
"MyService service": {"start_time": "{now}"}, # Dependency injection
}
wired = Wiring(spec)
service = wired.service() # Lazy instantiation + caching
spec is a plain dictionary. It can be written in Python, or come from a
config file, apywire doesn't care.
Documentation
📚 Full Documentation • Getting Started • API Reference • Examples
Build docs locally:
make docs-serve # http://127.0.0.1:8000
Development
make .venv && source .venv/bin/activate # Setup
make all # Format, lint, test, build
See docs/development.md for guidelines.
License
ISC License - see LICENSES/ISC.txt
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apywire-0.2.0.tar.gz.
File metadata
- Download URL: apywire-0.2.0.tar.gz
- Upload date:
- Size: 184.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f4172e70a798a161f15cb128195c9330ff0dc966354bc9b7fc6f9e47373e645
|
|
| MD5 |
80489c86fa17a270b165d4beebfe7797
|
|
| BLAKE2b-256 |
9e6177563a4f913cff94037b5bd1d13232454a7ccb7de79acfdf5d06eb2831d1
|
File details
Details for the file apywire-0.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.
File metadata
- Download URL: apywire-0.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
- Upload date:
- Size: 636.6 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae420c6bf373a170dd522770cd19fcbddad57b188295d7d1cac9627efaeb6fff
|
|
| MD5 |
5707269da9d49d1ce6f0160cff3dd6c3
|
|
| BLAKE2b-256 |
18ff5ca481dcb4eb5d101865c057e8f70f05a380dab5c02b24011694ea6a5456
|