Skip to main content

pytelog

Simple logger which dispatch messages to a telegram in markdown format. Uses a separate thread for a dispatching. Support many chats. Support big messages (over 4096 chars). Support telegram API calls restrictions.

Installation

pip install pytelog

Quick start

1. Configuration

config = {
    ...
    "version": 1,
    "disable_existing_loggers": False,
    "handlers": {
        "telegram": {
            "class": "pytelog.Handler",
            "token": "bot_token",
            "chat_ids": [123456789, -1234567891011],

        }
    },
    "loggers": {
        "telegram": {
            "level": "INFO",
            "handlers": ["telegram",]
        }
    }
}

2. Usage

import logging
logger = logging.getLogger("telegram")

logger.info("Message")

3. Formatting:

config = {
    ...
    "version": 1,
    "disable_existing_loggers": False,
    "formatters": {
        "telegram": {
            "()": "pytelog.MarkdownFormatter",
        }
    },
    ...
}

Metadata

Release files for pytelog 0.1

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

Built distribution (wheel)

Table of built distributions (wheels) for pytelog 0.1
File Interpreter ABI Platform Actions
pytelog-0.1-py3-none-any.whl Python 3 none any Details for pytelog-0.1-py3-none-any.whl

Release files / pytelog-0.1-py3-none-any.whl

Download URL pytelog-0.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e4e134161e6f258d89907f52b67816b83cc6ff436b3321d78ff7310bd15232e
BLAKE2b-256 checksum
How to use checksums
ca4b88127b07b80c5fa423c82bee382d5c13344e7cdac2b61a76f2b2cddb6a7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

Security for pytelog 0.1

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.

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file No provenance

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