aiogram-loguru
aiogram-loguru is a small library that ships some boilerplate code needed for integrating aiogram with loguru.
Features
- A sink for loguru that sends logs to a Telegram chat via a bot.
- and more features soon...
Requirements
Python 3.9+ is supported. It also requires aiogram (v3.18 or later) and loguru (v0.7.0 or later) to be installed.
Installation
pip install aiogram-loguru
Usage
You can use the sink like this:
from aiogram import Bot
from aiogram_loguru import AiogramSink
from loguru import logger
CHAT_ID = 12345 # the ID of a chat, where the logs will be sent to
bot = Bot("YOUR BOT TOKEN")
sink = AiogramSink(bot, CHAT_ID)
logger.add(sink)
Now all the logs will be sent to the selected Telegram chat. However, Telegram Bot API has rather painful limits, so you would probably want to limit the number of sent logs to the most important ones like this:
logger.add(sink, level='ERROR')
Lastly, for the sink to work, you should actually have an event loop running.
You should also await logger.complete() when your program is exiting to ensure that all logs
have been actually sent.
See the docs for details.
License
This project is licensed under the terms of the MIT license.
Metadata
Release files for aiogram-loguru 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiogram_loguru-0.1.3.tar.gz | 77.5 kB | With provenance | Details for aiogram_loguru-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiogram_loguru-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for aiogram_loguru-0.1.3-py3-none-any.whl |
Total release size: 82.0 kB
Release files / aiogram_loguru-0.1.3.tar.gz
| Download URL | aiogram_loguru-0.1.3.tar.gz |
|---|---|
| Size | 77.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a973a721e1f31ffa961e6faa0ee0db053c3e346ce396fe80aa4d299e27406b82
|
|
BLAKE2b-256 checksum How to use checksums |
0c37b60932b4e5b2fd960bb8e7c8d0a64875afbded523f2071dc14431a503a81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Apr 16, 2025.
Transparency logRelease files / aiogram_loguru-0.1.3-py3-none-any.whl
| Download URL | aiogram_loguru-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f1a8e106e8b7b3960487ea1b2bed4e1063f2ea74fd1cd84abb1703691465189
|
|
BLAKE2b-256 checksum How to use checksums |
c6a191bf902d59de7289393cb986b55f0d8bfcb48445dad749fbd9d8598eaa4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Apr 16, 2025.
Transparency logSecurity for aiogram-loguru 0.1.3
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for aiogram_loguru-0.1.3.tar.gz
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 Apr 16, 2025.
Transparency logA 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.