Metadata-Version: 2.4
Name: devhubsesion
Version: 0.1.0
Summary: Telegram account manager with session strings
Author: Astrea
License: Apache-2.0
Project-URL: Homepage, https://github.com/TheDevHubpro/devhubsesion
Project-URL: Repository, https://github.com/TheDevHubpro/devhubsesion
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: NOTICE
Requires-Dist: telethon>=1.34
Requires-Dist: nest-asyncio>=1.6
Dynamic: license-file

# devhubsesion

Telegram account manager with session strings. No Telethon code needed.

## install

    pip install devhubsesion

## usage

    from devhubsesion import DevHubSession

    with DevHubSession(session_string="...", api_id=123, api_hash="abc") as tg:
        for c in tg.list_private_chats():
            print(c["name"], c["id"])

or from .env:

    from devhubsesion import DevHubSession

    with DevHubSession.from_env() as tg:
        print(tg.list_private_chats())

## methods

- list_private_chats
- list_groups_channels
- dump_history(user, limit, save)
- last_message(user)
- backup_voices(user=None)
- backup_photos(user=None)
- backup_full()
- watch(user=None, callback=None)
- list_contacts()
- extract_numbers(limit_per_chat, save)
- list_active_sessions()
- change_bio(text)
- change_name(first, last)
- send_message(user, text)

## license

Apache-2.0
