TelegrapAPI - Асинхронная и синхронная версия
В чём суть проекта? Да в мире существуют 100-1000 API под Telegraph, но я просто захотел, почему бы и нет?
Features (Особенности)
- Синхронный и Асинхронный режим.
- Поддержка Pydantic.
- Более приятный DX, работа как с ORM
How to Download (Как скачать?)
pip install api-telegraph # Вуаля!
Example (Примеры)
from telegraph_api import Telegraph
with Telegraph() as client:
account = client.create_account( # Создали аккаунт!
short_name="GH",
author_name="GameHipe",
author_url="https://github.com/game-hipe",
)
page = account.create_page(
title = "Hello World! Start Game!",
html = "<p>Hello, world!</p>"
)
print(page)
AsyncExample (Примеры)
import asyncio
from telegraph_api import AsyncTelegraph
async def main():
async with AsyncTelegraph() as client:
account = await client.create_account( # Создали аккаунт!
short_name="GH",
author_name="GameHipe",
author_url="https://github.com/game-hipe",
)
await account.create_page(
title = "Hello World! Start Game!",
html = "<p>Hello, world!</p>"
)
asyncio.run(main())
Всё идеальное в простом!
Metadata
Release files for api-telegraph 1.0.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 | |
|---|---|---|---|
| api_telegraph-1.0.7.tar.gz | 23.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| api_telegraph-1.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.9 kB
Release files / api_telegraph-1.0.7.tar.gz
| Download URL | api_telegraph-1.0.7.tar.gz |
|---|---|
| Size | 23.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b858217075fb281a75f8207e8ad7a1ef2a1ddc3f1e0385c859b6b1bac3b5adda
|
|
BLAKE2b-256 checksum How to use checksums |
06c39383ed31422a47d72581790b3918df9cb16f28ef6c81959886101bb98e53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / api_telegraph-1.0.7-py3-none-any.whl
| Download URL | api_telegraph-1.0.7-py3-none-any.whl |
|---|---|
| Size | 27.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da433e04f3eda187765179c487c24721ab6abe99e73fb9d0d74d1343b640d636
|
|
BLAKE2b-256 checksum How to use checksums |
c702bf40cfe40456229625337f5f33e4585ee12da3e69d88970789ed7cf30f5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|