Skip to main content

TelegrapAPI - Асинхронная и синхронная версия

В чём суть проекта? Да в мире существуют 100-1000 API под Telegraph, но я просто захотел, почему бы и нет?

Features (Особенности)

  1. Синхронный и Асинхронный режим.
  2. Поддержка Pydantic.
  3. Более приятный 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)

Source distribution for api-telegraph 1.0.7
File Size Uploaded
api_telegraph-1.0.7.tar.gz 23.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for api-telegraph 1.0.7
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.5

2 release files

1.0.4

2 release files

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