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 details)
Built Distribution
telegraph-2.2.0-py3-none-any.whl
(10.7 kB
view details)
File details
Details for the file telegraph-2.2.0.tar.gz
.
File metadata
- Download URL: telegraph-2.2.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 012908f18208c451c7189f4bda7c39a1369241ac436c7543bb6c3fccbe9cfd5d |
|
MD5 | 8122865dbf2e2b3eefef300f2b434eff |
|
BLAKE2b-256 | 49811c9f99004e23555fb21b80a2ef6ddbecb3a7a4eefbc4aac75ffb5a9ccf71 |
File details
Details for the file telegraph-2.2.0-py3-none-any.whl
.
File metadata
- Download URL: telegraph-2.2.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d20b2a5d7cfdd66890c8c3fd60aa8585cabb7c6b03579d3eb1cd8af056ed9971 |
|
MD5 | 9004b67a0c866fc60e25fa823f6c1a2f |
|
BLAKE2b-256 | d3751bc2f8c4e4a736e2e582a1518eb4621db3c9dcb100f379fab5ab49c8d1ac |