Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

aiogram album

Base handler

from aiogram_album import AlbumMessage

@router.message(F.media_group_id)
async def media_handler(message: AlbumMessage):
    await message.reply(
        f"album\n"
        f"size: {len(message)}\n"
        f"content types: {[m.content_type.value for m in message]}"
    )

PyrogramAlbumMiddleware

Install

pip install aiogram_album Pyrogram cachetools TgCrypto

Usage

from aiogram_album.pyrogram_album.middleware import PyrogramAlbumMiddleware



await PyrogramAlbumMiddleware.from_app_data(
    bot_token=BOT_TOKEN,
    api_id=API_ID,
    api_hash=API_HASH,
    router=dp,
)

or

from aiogram_album.pyrogram_album.middleware import PyrogramAlbumMiddleware
from pyrogram import Client
from aiogram import Bot

bot = Bot(BOT_TOKEN)
client = Client(str(bot.id), bot_token=BOT_TOKEN, api_hash=API_HASH, api_id=API_ID, no_updates=True)
await client.start()

PyrogramAlbumMiddleware(
    client=client,
    router=dp,
)

TTLCacheAlbumMiddleware

Install

pip install aiogram_album cachetools

Usage

from aiogram_album.ttl_cache_middleware import TTLCacheAlbumMiddleware


TTLCacheAlbumMiddleware(router=dp)

CountCheckAlbumMiddleware

Install

pip install aiogram_album

Usage

from aiogram_album.count_check_middleware import CountCheckAlbumMiddleware


CountCheckAlbumMiddleware(router=dp)

WithoutCountCheckAlbumMiddleware

Install

pip install aiogram_album

Usage

from aiogram_album.no_check_count_middleware import WithoutCountCheckAlbumMiddleware


WithoutCountCheckAlbumMiddleware(router=dp)

LockAlbumMiddleware

Install

pip install aiogram_album cachetools

Usage

from aiogram_album.lock_middleware import LockAlbumMiddleware


LockAlbumMiddleware(router=dp)

Metadata

Release files for aiogram_album 0.0.4b0

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_album 0.0.4b0
File Size Uploaded
aiogram_album-0.0.4b0.tar.gz 20.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiogram_album 0.0.4b0
File Interpreter ABI Platform
aiogram_album-0.0.4b0-py3-none-any.whl Python 3 none any Details

Total release size: 46.6 kB

Release files / aiogram_album-0.0.4b0.tar.gz

Download URL aiogram_album-0.0.4b0.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6fe43b2249d065606eabd59b5f3d0a149fbef4e7e6a1532bf43592568db8dbdf
BLAKE2b-256 checksum
How to use checksums
464eefa1d797cda936f57f99b2b583e407c63ab60fee4946f97b5ff7eb2e6e2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.0 Windows/10

Release files / aiogram_album-0.0.4b0-py3-none-any.whl

Download URL aiogram_album-0.0.4b0-py3-none-any.whl
Size 26.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1d7dbe7a880da01ad15cb8df4af35bf16a3b3490b8422ea403fb32e75732ea6
BLAKE2b-256 checksum
How to use checksums
0a818912238fd77bd7edd8b46bf236873ce1f0184b8b84f591fff1920dfb03a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.0 Windows/10
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