Skip to main content

No project description provided

Project description

aiotelegraph

MIT license built with Python3 paypal

Description

This is simple async library for interaction with Telegra.ph API

Contents

Release Notes

Version 0.1.0

  • Init library

Getting Started

Installation from pip

For installation aiotelegraph library from pip you should have pip with python (prefer python3.6 or later)

pip install aiotelegraph

Installation from GitHub

To basic installation from GitHub repository you should have git, python3 (prefer python3.6 or later), pip (optionally) in your system

git clone https://github.com/OlegYurchik/aiotelegraph.git
cd aiotelegraph
pip install .

or

git clone https://github.com/OlegYurchik/aiotelegraph.git
cd aiotelegraph
python setup.py install

Quick Start

After installation, you can use the library in your code. Below is a sneak example of using the library.

from asyncio
from aiotelegraph import NodeElement, TelegraphClient


async def main():
    client = TelegraphClient()
    await client.create_account(short_name="ShortName", author_name="AuthorName", author_url="AuthorUrl")

    content = [
        NodeElement(text="Hello"),
        NodeElement(text="Neighbour"),
    ]
    page = await client.create_page(title="Greeting", content=content, return_content=True) 


loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiotelegraph-0.1.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

aiotelegraph-0.1.0-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page