Skip to main content

AIOGraph

PyPI PyPi status Travis-CI Codecov MIT License

aiograph - asynchronous Python Telegra.ph API wrapper.

Annotations

The Telegraph class (aiograph.Telegraph) encapsulates all API calls in a single class. It provides functions such as create_page, get_views and other’s methods described at Telegra.ph/api page

All data types stored In the package aiograph.types.

All methods are named following the PEP-8 instructions for example create_account for createAccount method and etc. All API methods are awaitable and can be called only inside Event-loop.

Also if you want to upload the file to Telegra.ph service use upload method from the instance of Telegraph class.

By the end of all actions you will need to close HTTP connections by calling the close() method (is awaitable).

Installation

Using PIP

$ pip install -U aiograph

From sources

$ git clone https://github.com/aiogram/aiograph.git
$ cd aiograph
$ python setup.py install

Usage examples

Basics

import asyncio

from aiograph import Telegraph

loop = asyncio.get_event_loop()
telegraph = Telegraph()


async def main():
    await telegraph.create_account('aiograph-demo')
    page = await telegraph.create_page('Demo', '<p><strong>Hello, world!</strong></p>')
    print('Created page:', page.url)


if __name__ == '__main__':
    try:
        loop.run_until_complete(main())
    except (KeyboardInterrupt, SystemExit):
        pass
    finally:
        loop.run_until_complete(telegraph.close())  # Close the aiohttp.ClientSession

Metadata

Release files for aiograph 0.2

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

Source distribution (sdist)

Source distribution for aiograph 0.2
File Size Uploaded Provenance
aiograph-0.2.tar.gz 13.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 28.6 kB

Release files / aiograph-0.2.tar.gz

Download URL aiograph-0.2.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e44afe92bd0c73f056f36dae47424a0fcc277d28f9783049408b1e8e5b9b5a1e
BLAKE2b-256 checksum
How to use checksums
9448d91daec35f93e7c314ecee78fe5e89eb5e9ac16bfc17bb9ddffed5a98022
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / aiograph-0.2-py3-none-any.whl

Download URL aiograph-0.2-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0db6bf351ae1eb874f7f041d031e3882df781159200d8334dc6b732e6f7bcb2
BLAKE2b-256 checksum
How to use checksums
332367e592fb8115e6c37351e633a797818b98e37f01f08580ed24847b8f3f8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Security for aiograph 0.2

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.

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