Python SDK for Telegraph (telegra.ph) API with sync and async support
Project description
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())
Всё идеальное в простом!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
api_telegraph-1.0.7.tar.gz
(23.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file api_telegraph-1.0.7.tar.gz.
File metadata
- Download URL: api_telegraph-1.0.7.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b858217075fb281a75f8207e8ad7a1ef2a1ddc3f1e0385c859b6b1bac3b5adda
|
|
| MD5 |
872cdda7e45ea7bc6f59ca0bd8356c8e
|
|
| BLAKE2b-256 |
06c39383ed31422a47d72581790b3918df9cb16f28ef6c81959886101bb98e53
|
File details
Details for the file api_telegraph-1.0.7-py3-none-any.whl.
File metadata
- Download URL: api_telegraph-1.0.7-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da433e04f3eda187765179c487c24721ab6abe99e73fb9d0d74d1343b640d636
|
|
| MD5 |
bdb1e9e2f9ac4c942d0956440feceffb
|
|
| BLAKE2b-256 |
c702bf40cfe40456229625337f5f33e4585ee12da3e69d88970789ed7cf30f5e
|