Skip to content

Repository files navigation

Telegraph

PyPIPython VersionsLicense

Python Telegraph API wrapper

$ python3 -m pip install telegraph
# with asyncio support
$ python3 -m pip install 'telegraph[aio]'

Example

fromtelegraphimportTelegraphtelegraph=Telegraph()
telegraph.create_account(short_name='1337')
response=telegraph.create_page(
'Hey',
html_content='<p>Hello, world!</p>'
)
print(response['url'])

Async Example

importasynciofromtelegraph.aioimportTelegraphasyncdefmain():
telegraph=Telegraph()
print(awaittelegraph.create_account(short_name='1337'))
response=awaittelegraph.create_page(
'Hey',
html_content='<p>Hello, world!</p>',
)
print(response['url'])
asyncio.run(main())

About

Telegraph API wrapper | Telegra.ph

Topics

Resources

Stars

306 stars

Watchers

8 watching

Forks

Releases

Used by

Contributors

Languages