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.2.0.tar.gz
(8.0 kB
view hashes)
Built Distribution
telegraph-2.2.0-py3-none-any.whl
(10.7 kB
view hashes)
Close
Hashes for telegraph-2.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d20b2a5d7cfdd66890c8c3fd60aa8585cabb7c6b03579d3eb1cd8af056ed9971 |
|
MD5 | 9004b67a0c866fc60e25fa823f6c1a2f |
|
BLAKE2b-256 | d3751bc2f8c4e4a736e2e582a1518eb4621db3c9dcb100f379fab5ab49c8d1ac |