Skip to main content

Aiogram DI

Installation

  • Latest version from GitHub

    pip install git+https://github.com/MaximZayats/aiogram-di
    
  • From PyPi

    pip install -U aiogram-di
    

Usage

  • Initialization

    from aiogram_di import DIMiddleware
    
    @dataclass
    class A:
        id: int
    
    dp.message.middleware(
        DIMiddleware(
            {
                A: lambda: A(id=1),
            }
        )
    )
    
  • Usage

    @dp.message()
    async def handler(
        message: Message,
        a: A,  # <- will be injected
    ) -> None:
      assert a.id == 1
    

Metadata

Release files for aiogram-di 0.1.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 aiogram-di 0.1.0
File Size Uploaded Provenance
aiogram-di-0.1.0.tar.gz 1.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aiogram-di 0.1.0
File Interpreter ABI Platform
aiogram_di-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.2 kB

Release files / aiogram-di-0.1.0.tar.gz

Download URL aiogram-di-0.1.0.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d6f04b58a1c5d034214e021134b826551cf072911509a4960d1399779dc2ae5e
BLAKE2b-256 checksum
How to use checksums
2dea4855bec8f15efb7ec4acd7828d15e730a7da56cbbc94fb243845fa9157bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Release files / aiogram_di-0.1.0-py3-none-any.whl

Download URL aiogram_di-0.1.0-py3-none-any.whl
Size 1.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3bedd8998fbe6bb93fbad5dd4c6bc3ad390e346b0ae3f0c853cfc58c007d9d76
BLAKE2b-256 checksum
How to use checksums
88887acd5d583583d9a8300504df803831dd181c8984428a89ea6ed18ed46b5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.15

Security for aiogram-di 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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