telegram_pydantic - Set of Pydantic models, generated according to Telegram TL Scheme
Layer 181
Example
from pydantic import TypeAdapter
from telegram_pydantic import base
from telegram_pydantic import types
ta = TypeAdapter(base.Message) # Base Constructor
json_data = {
"_": "types.Message",
"id": 1,
"peer_id": {"_": "types.PeerUser", "user_id": 1},
"date": 1720715931,
"message": "Hello, World!",
"out": False,
"mentioned": False,
"media_unread": False,
"silent": False,
"post": False,
"from_scheduled": False,
"legacy": False,
"edit_hide": False,
"pinned": False,
"noforwards": False,
"invert_media": False,
"offline": False,
"saved_peer_id": {"_": "types.PeerUser", "user_id": 1},
"entities": [],
"restriction_reason": []
}
message = ta.validate_python(json_data)
print(isinstance(message, types.Message)) # True
LICENSE
This project is licensed under the terms of the MIT license.
Metadata
Release files for telegram-pydantic 0.181.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| telegram_pydantic-0.181.7.tar.gz | 220.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| telegram_pydantic-0.181.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / telegram_pydantic-0.181.7.tar.gz
| Download URL | telegram_pydantic-0.181.7.tar.gz |
|---|---|
| Size | 220.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b4ffa93f0bf9585c213541af97ba7ad46849fab5b2c69939588d578ea512202
|
|
BLAKE2b-256 checksum How to use checksums |
cd0860daf9fa9675683e881709ce02be3280ccbaf9986b65b32705e413f3e780
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / telegram_pydantic-0.181.7-py3-none-any.whl
| Download URL | telegram_pydantic-0.181.7-py3-none-any.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1408231e9bf62911895e1e5cb62ab69df150283d4ba6bee5bad22c3e9567291
|
|
BLAKE2b-256 checksum How to use checksums |
101f3b8421589c03b43cd897baaa938e0a78b2865858e8cb167398bcee6b8e93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|