python-telegram-client
This is a fork of alexander-akhmetov/python-telegram. The root package is renamed from "telegram" to "teleclient" to avoid name conflict with python-telegram-bot.
Installation
This library requires Python 3.6+ and Linux or MacOS.
pip install python-telegram-client
See documentation for more details.
How to use
Have a look at the tutorial :)
Basic example:
from teleclient.client import Telegram
from teleclient.text import Spoiler
tg = Telegram(
api_id='api_id',
api_hash='api_hash',
phone='+31611111111', # you can pass 'bot_token' instead
database_encryption_key='changekey123',
files_directory='/tmp/.tdlib_files/',
)
tg.login()
# if this is the first run, library needs to preload all chats
# otherwise the message will not be sent
result = tg.get_chats()
result.wait()
chat_id: int
result = tg.send_message(chat_id, Spoiler('Hello world!'))
# `tdlib` is asynchronous, so `python-telegram` always returns you an `AsyncResult` object.
# You can receive a result with the `wait` method of this object.
result.wait()
print(result.update)
tg.stop() # you must call `stop` at the end of the script
More examples you can find in the /examples/ directory.
More information in the documentation.
Development
See CONTRIBUTING.md.
Metadata
Release files for python-telegram-client 0.17.0.post0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python-telegram-client-0.17.0.post0.tar.gz | 15.6 MB | Without provenance | Details for python-telegram-client-0.17.0.post0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_telegram_client-0.17.0.post0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for python_telegram_client-0.17.0.post0-py2.py3-none-any.whl |
Total release size: 31.3 MB
Release files / python-telegram-client-0.17.0.post0.tar.gz
| Download URL | python-telegram-client-0.17.0.post0.tar.gz |
|---|---|
| Size | 15.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b91a1b440374cdbb087da3116e8de59ac8ad0f4a5f124412a710426ea7c301d2
|
|
BLAKE2b-256 checksum How to use checksums |
5707b1549360429e68edb747285e746252082d7e5a20212b07d184b9dfb4861d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Release files / python_telegram_client-0.17.0.post0-py2.py3-none-any.whl
| Download URL | python_telegram_client-0.17.0.post0-py2.py3-none-any.whl |
|---|---|
| Size | 15.7 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
32b845fab177a2500f92199dc0b33ca8d80c06c9cdd010eef2b4074008d6602f
|
|
BLAKE2b-256 checksum How to use checksums |
62df410512ea863819067d4d15854dd2dae8d1e943773cb695a6ac0477904813
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|
Security for python-telegram-client 0.17.0.post0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.