Telegraph API wrapper
Project description
Telegraph
Python Telegraph API wrapper
$ python3 -m pip install telegraph
# with asyncio support
$ python3 -m pip install 'telegraph[aio]'
Example
from telegraph import Telegraph
telegraph = Telegraph()
telegraph.create_account(short_name='1337')
response = telegraph.create_page(
'Hey',
html_content='<p>Hello, world!</p>'
)
print(response['url'])
Async Example
import asyncio
from telegraph.aio import Telegraph
async def main():
telegraph = Telegraph()
print(await telegraph.create_account(short_name='1337'))
response = await telegraph.create_page(
'Hey',
html_content='<p>Hello, world!</p>',
)
print(response['url'])
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
telegraph-2.1.0.tar.gz
(8.0 kB
view hashes)
Built Distribution
telegraph-2.1.0-py3-none-any.whl
(10.7 kB
view hashes)
Close
Hashes for telegraph-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fed87d8fbc4edf1f57de575d9f9bf1baf0a626341e97b8452e59144c0decd8ba |
|
MD5 | cc1774d4b198e11466d24d58c1588602 |
|
BLAKE2b-256 | e3da9287dd59d1f461db44e7a1aa7c2a4a8b15a533b4199bf1d5c957c1fb2df1 |