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 details)
Built Distribution
telegraph-2.1.0-py3-none-any.whl
(10.7 kB
view details)
File details
Details for the file telegraph-2.1.0.tar.gz
.
File metadata
- Download URL: telegraph-2.1.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ea37bc8708da3fe366827cabfd93bec58b6fa080cd65dec7fb5f97285225690 |
|
MD5 | 5664af7d562e8367ce5452614c1583ba |
|
BLAKE2b-256 | ac23938c1bb7444bf19b54d3e8efe541d1d887a84c314c33197af2486416b741 |
File details
Details for the file telegraph-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: telegraph-2.1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fed87d8fbc4edf1f57de575d9f9bf1baf0a626341e97b8452e59144c0decd8ba |
|
MD5 | cc1774d4b198e11466d24d58c1588602 |
|
BLAKE2b-256 | e3da9287dd59d1f461db44e7a1aa7c2a4a8b15a533b4199bf1d5c957c1fb2df1 |