Metadata-Version: 2.5
Name: tgmint
Version: 1.18.1
Summary: tgmint — opentele lineage: tdata/telethon conversion, official-API fingerprints, software passkeys
Project-URL: Homepage, https://github.com/drshta0/tgmint
Project-URL: Repository, https://github.com/drshta0/tgmint
Project-URL: Issues, https://github.com/drshta0/tgmint/issues
Project-URL: Changelog, https://github.com/drshta0/tgmint/blob/main/CHANGELOG.md
Project-URL: Upstream, https://github.com/thedemons/opentele
Author: thedemons
Maintainer: drshta0
License: MIT License
        
        Copyright (c) 2022 thedemons
        Copyright (c) 2026 the tgmint authors (fork changes; see FORK.md)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: fingerprint,passkeys,session,tdata,tdesktop,telegram,telethon,tgmint
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Security
Requires-Python: >=3.9
Requires-Dist: telethon<2,>=1.24
Requires-Dist: tgcrypto
Provides-Extra: passkeys
Requires-Dist: cryptography; extra == 'passkeys'
Provides-Extra: qt
Requires-Dist: pyqt5; extra == 'qt'
Description-Content-Type: text/markdown

<p align="center">
  <img src="docs/assets/logo.svg" alt="tgmint" width="100"/>
</p>

<h1 align="center">tgmint</h1>

<p align="center">
  <b>Make your Telegram scripts connect as the real Telegram app, and avoid bot detection.</b>
</p>

<p align="center">
  <a href="https://pypi.org/project/tgmint/"><img alt="PyPI" src="https://img.shields.io/pypi/v/tgmint?color=0f766e"></a>
  <a href="https://pypi.org/project/tgmint/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/tgmint?color=0f766e"></a>
  <a href="https://github.com/drshta0/tgmint/actions/workflows/package.yml"><img alt="tests" src="https://github.com/drshta0/tgmint/actions/workflows/package.yml/badge.svg"></a>
  <a href="LICENSE"><img alt="MIT" src="https://img.shields.io/badge/license-MIT-0f766e"></a>
</p>

- 🕵️ **Looks like the official app.** Telethon and Pyrogram connect with the official Telegram Desktop, Android or iOS identity instead of announcing themselves as a script.
- 🔑 **Passkey login.** Log in with a file instead of an SMS code. No other Telegram library supports this.
- 🔁 **Any session, any library.** Convert between tdata, Telethon, Pyrogram and GramJS, or import from the Android app. Offline.
- 🧩 **Works with every major framework.** Telethon, kurigram, pyrofork and hydrogram in Python; GramJS, MadelineProto and anything else through the CLI's `--json` output.

## Why it matters

Telegram [automatically puts accounts on unofficial API clients under observation](https://core.telegram.org/api/obtaining_api_id#using-the-api-id), and your library tells Telegram exactly what it is:

| Telegram sees | Telethon | Pyrogram | **tgmint** |
|---|---|---|---|
| App ID | your own | your own | **Telegram Desktop's official one** |
| Device | `PC 64bit` | `CPython 3.12.3` | **`ASUS MB`** |
| System | `6.17.9` | `Linux 6.17.9-76061709-generic` | **`Windows 11 x64`** |
| App version | `1.45.0` | `Pyrogram 2.2.26` | **`7.3.3 x64`** |

tgmint's identities are current (checked weekly against the official apps), consistent (no impossible device and version combinations), and stay the same on every login.

## Quick start

```bash
pip install "tgmint[passkeys]"
```

```python
from tgmint.api import API
from tgmint.tl import TelegramClient

client = TelegramClient("me.session", api=API.TelegramDesktop.Generate(unique_id="me"))
```

```python
from tgmint.passkeys import register_passkey, login_with_passkey

await register_passkey(client, path="me.passkey")             # once
me = await login_with_passkey(new_client, path="me.passkey")  # later: no phone, no SMS
```

```bash
tgmint convert --from tdata/ --from-format tdata --to me.session --to-format telethon-session
```

Also included: QR-code login, one-file encrypted account backups, automatic repair of logged-out sessions, and a CLI for everything.

## Docs

**[Getting started](docs/getting-started.md)** · [How it works](docs/concepts.md) · [Passkeys](docs/passkeys.md) · [CLI](docs/cli.md) · [API reference](docs/reference/index.md) · [Supported libraries](docs/frameworks.md)

## Responsible use

For **your own accounts** only. tgmint has no multi-account tools. It removes the signals that mark your client as a script, but it can't guarantee how Telegram treats an account.

---

MIT · Continues [thedemons/opentele](https://github.com/thedemons/opentele) ([what changed](FORK.md)) · [Contributing](CONTRIBUTING.md)
