Skip to main content

No project description provided

Project description

Installation

pip install --upgrade andytele

First Run

Load TDesktop from tdata folder and convert it to telethon, with a custom API:

from andytele import Client, Manager
from andytele import events, errors
from andytele.td import TDesktop
from andytele.td.account import Account
from andytele.tl.telethon import TelegramClient
from andytele.api import API, APIData, CreateNewSession, UseCurrentSession, getByRegion

import asyncio

async def main():
    
    manager = Manager()
    
    client1 = Client(r"C:\Users\123\Desktop\213656381926")

    # get TelegramClient object
    c1 = await client1.getTelegramClient()
    await c1.connect()

    @c1.on(events.NewMessage())
    async def newMessage(event):
        print(event)

    # get TDesktop object
    t1 = await client1.getTDesktop()
    manager.add_client("213656381926", client=c1)
    client2 = Client(r"C:\Users\123\Desktop\95\+8801728193502.session")
    
        
    c2 = await client2.getTelegramClient()
    await c2.connect()
    manager.add_client("8801728193502", client=c2)
    t2 = await client2.getTDesktop()
    
    print(await manager.get_client('213656381926').GetMe())
    print(c1.phone)

    print( await manager.get_client('8801728193502').GetMe())
    print(getByRegion('KE'))

    await client.connect()
    await client.PrintSessions()

asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

andytele-1.0.2.tar.gz (77.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

andytele-1.0.2-py3-none-any.whl (245.6 kB view details)

Uploaded Python 3

File details

Details for the file andytele-1.0.2.tar.gz.

File metadata

  • Download URL: andytele-1.0.2.tar.gz
  • Upload date:
  • Size: 77.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for andytele-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b6e75d6dd54a58c11c0a860322c53fb7fc3e8ced2719898f30e6511c3b3ab2fd
MD5 01bf17171cb37120ffc695a16d84f324
BLAKE2b-256 cef8d4bb481cc40aff085a9824575f4cdfa5ba0d351032cc91a0e32b73bf328b

See more details on using hashes here.

File details

Details for the file andytele-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: andytele-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 245.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for andytele-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 61ff70d44ea646ccbcb90e5fb8baa87d4478f89bd416d3472f5b0f21cba91047
MD5 f080c6428b51d1472d5847284e96dc2c
BLAKE2b-256 4f9775cd24ead576e156333d7bf160b5fc0cfc23897b0fed043acb36309f3e7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page