All Projects → andrew-ld → python-tdlib

andrew-ld / python-tdlib

Licence: MIT license
full oop python 3 tdlib wrapper, fast, thread safe

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-tdlib

tdlight-java
Complete Bot and Userbot Telegram library based on TDLib
Stars: ✭ 128 (+540%)
Mutual labels:  mtproto, tdlib
gotgproto
A helper package for Go Telegram Client, i.e. gotd/td.
Stars: ✭ 32 (+60%)
Mutual labels:  mtproto, tdlib
Pyrogram
Telegram MTProto API Client Library and Framework in Pure Python for Users and Bots
Stars: ✭ 2,252 (+11160%)
Mutual labels:  mtproto, tdlib
node-tg-native
Telegram Native lib
Stars: ✭ 22 (+10%)
Mutual labels:  mtproto, tdlib
tdlight-telegram-bot-api
The TDLight Telegram Bot API is an actively enhanced fork of the original Bot API, featuring experimental user support, proxies, unlimited files size, and more.
Stars: ✭ 71 (+255%)
Mutual labels:  mtproto, tdlib
aiotdlib
Python asyncio Telegram client based on TDLib https://github.com/tdlib/td
Stars: ✭ 63 (+215%)
Mutual labels:  mtproto, tdlib
Grammers
(tele)gramme.rs - use Telegram's API from Rust
Stars: ✭ 109 (+445%)
Mutual labels:  mtproto
Mtproto
MTProto implementation in Golang
Stars: ✭ 190 (+850%)
Mutual labels:  mtproto
Telegram React
Experimental Telegram web client with tdlib, webassembly and react js under the hood
Stars: ✭ 1,332 (+6560%)
Mutual labels:  mtproto
Callsmusic
The first open-source PyTgCalls-based project.
Stars: ✭ 62 (+210%)
Mutual labels:  mtproto
tgcalls
Voice chats, private incoming and outgoing calls in Telegram for Developers
Stars: ✭ 408 (+1940%)
Mutual labels:  mtproto
tdlib-binaries
prebuilt TDLib binaries
Stars: ✭ 26 (+30%)
Mutual labels:  tdlib
Telegramgo
CLI telegram client written in golang
Stars: ✭ 145 (+625%)
Mutual labels:  mtproto
Novagram
An Object-Oriented PHP library for Telegram Bots
Stars: ✭ 112 (+460%)
Mutual labels:  mtproto
Telegramapi
Java library to create Telegram Clients
Stars: ✭ 198 (+890%)
Mutual labels:  mtproto
Unigram
A Telegram desktop app made for Windows 10
Stars: ✭ 1,393 (+6865%)
Mutual labels:  mtproto
mtproto-js
🚀 Fastest ever MTProto JavaScript implementation
Stars: ✭ 23 (+15%)
Mutual labels:  mtproto
Mtproto
Golang MTProto implementation. Current API layer is 65
Stars: ✭ 86 (+330%)
Mutual labels:  mtproto
Jsmtproxy
High Performance NodeJS MTProto Proxy
Stars: ✭ 254 (+1170%)
Mutual labels:  mtproto
Mtproto
Telegram MTProto and its proxy (over gRPC) in Go (golang). API Layer: 71
Stars: ✭ 133 (+565%)
Mutual labels:  mtproto

warning: since tdlib memory leak I don't maintain this wrapper anymore because I will never use it again, tell levlam to fix tdlib memory leak, as long as there are these memory leaks over 10gb this mtproto client is a piece of shit

alternatives which I strongly recommend:

https://docs.pyrogram.org

https://telethon.dev

python-tdlib

full oop python 3 tdlib wrapper, fast, thread safe

install

sudo pip3 install git+https://github.com/andrew-ld/python-tdlib 

example

from py_tdlib import Client, Pointer, Auth
from py_tdlib.constructors import getMe

# demo api key, get your from https://my.telegram.org
api_id = 94575
api_hash = "a3406de8d171bb422bb6ddf3bbd800e2"

# creating a client
tdjson = Pointer("data/tdjson.so")
client = Client(tdjson)

# login using phone number
tdjson.verbosity(0)
Auth(api_id, api_hash, client).phone()

# login using bot token
#
# tdjson.verbosity(0)
# Auth(api_id, api_hash, client).token("<bot_token>")

# making an API call
result = client.send(getMe())
print(result)

# get updates
for update in client.get_updates():
    print(update)

sending a message

from py_tdlib.constructors import (
    sendMessage, formattedText
    inputMessageText
)

result = client.send(
    sendMessage(
        chat_id = <chat_id>,
        input_message_content = inputMessageText(
            text = formattedText(
                text = "<TEXT>"
            )
        )
    )
)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].