Skip to main content

py-autowired

py-autowired injects runtime dependencies into fields declared with one rule:

class UserService:
    def __init__(self):
        self.user_repository_instance = None

Application code contains no manual dependency-resolution calls. Register the services once and call auto_inject() once during startup.

from py_autowired.autowired import auto_inject
from py_autowired.container import Container

container = Container()
container.register_scoped(IUserRepository, SqliteUserRepository)
container.register_transient(UserService)
auto_inject(container, root_dir="/absolute/path/to/project")

with container.create_scope():
    service = UserService()
    print(service.user_repository_instance)

Runtime package

The installed runtime contains only:

py_autowired/
  autowired.py
  container.py

Python namespace packages make __init__.py unnecessary.

Frameworks

The same core works with Console, FastAPI/ASGI, Flask/WSGI and Django. Framework examples are under examples/; each uses domain, application, infrastructure, composition and presentation layers without manual dependency resolution.

See KULLANIM_KILAVUZU_TR.md and USAGE_GUIDE_EN.md.

Release files for py-autowired 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-autowired 0.4.0
File Size Uploaded
py_autowired-0.4.0.tar.gz 31.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-autowired 0.4.0
File Interpreter ABI Platform
py_autowired-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size:48.9 kB

Release files / py_autowired-0.4.0.tar.gz

Download URL py_autowired-0.4.0.tar.gz
Size 31.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7a456aafe29f4e3deb33f1bdef4246b3a30cc0bb6af864dc1958af4d1f80f69b
BLAKE2b-256 checksum
How to use checksums
b5f2aac96130898d6eb49d42349a03a3b151421a80bcff5c95a2f15b2bb02079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / py_autowired-0.4.0-py3-none-any.whl

Download URL py_autowired-0.4.0-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b11205e0077e8aed02286bd875ee6dc2ef85a03246e3bf7f622c06dc6a1209a
BLAKE2b-256 checksum
How to use checksums
c63273cc410680b185e21c9074c32e1b77c9a6ef307c1c929f7a77eb11e50fcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page