Metadata-Version: 2.4
Name: wzgram
Version: 3.0.18
Summary: Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots
Project-URL: Homepage, https://github.com/rjriajul/wzgram
Project-URL: Documentation, https://github.com/rjriajul/wzgram
Project-URL: Source, https://github.com/rjriajul/wzgram
Project-URL: Issues, https://github.com/rjriajul/wzgram/issues
Author-email: Dan <dan@pyrogram.org>
Maintainer: rjriajul
License-Expression: LGPL-3.0-or-later
License-File: COPYING
License-File: COPYING.lesser
Keywords: api,chat,client,library,messenger,mtproto,python,telegram
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Communications
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: aiosqlite>=0.20.0
Requires-Dist: pysocks==1.7.1
Requires-Dist: warpcrypto>=2.0.4
Provides-Extra: dev
Requires-Dist: jinja2>=3; extra == 'dev'
Requires-Dist: poethepoet>=0.32; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: pyyaml>=6; extra == 'dev'
Requires-Dist: twine>=5; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo>=2023; extra == 'docs'
Requires-Dist: sphinx>=7; extra == 'docs'
Provides-Extra: fast
Requires-Dist: uvloop<=0.22.1; (sys_platform == 'darwin' or sys_platform == 'linux') and extra == 'fast'
Description-Content-Type: text/markdown

# wzgram

[![PyPI](https://img.shields.io/pypi/v/wzgram)](https://pypi.org/project/wzgram/)
[![Python](https://img.shields.io/pypi/pyversions/wzgram)](https://pypi.org/project/wzgram/)
[![Downloads](https://img.shields.io/pypi/dm/wzgram)](https://pypi.org/project/wzgram/)
[![License](https://img.shields.io/github/license/rjriajul/wzgram)](LICENSE)
[![Documentation](https://img.shields.io/badge/docs-rjriajul.github.io/blue)](https://rjriajul.github.io/wzgram)

> Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots

wzgram is a **drop-in replacement** for Pyrogram — your existing `from pyrogram import ...` code works without changes, with access to the latest Telegram features including **Gifts, Stories, Topics, Business Accounts**, and more.

```python
from pyrogram import Client, filters

app = Client("my_account")


@app.on_message(filters.private)
async def hello(client, message):
    await message.reply("Hello from wzgram!")


app.run()
```

**wzgram** is a modern, elegant and asynchronous [MTProto API](https://docs.pyrogram.org/topics/mtproto-vs-botapi) framework. It enables you to easily interact with the main Telegram API through a user account (custom client) or a bot identity (bot API alternative) using Python.

### Key Features

- **Drop-in Replacement** — Use `from pyrogram import ...`; existing codebases migrate with zero import changes.
- **Up-to-Date** — Supports Gifts, Stories, Topics, Business Accounts, Giveaways, and the latest Telegram layer.
- **Async Natively** — Fully `async`/`await` throughout. Also usable synchronously via `app.run()` for convenience.
- **Type-hinted** — Every type and method is annotated for excellent editor support.
- **Fast** — Boosted by [WarpCrypto](https://github.com/rjriajul/WarpCrypto), a high-performance cryptography library written in Rust.
- **Powerful** — Full access to Telegram's API for any official client action and more.

### Example with Inline Keyboard

```python
from pyrogram import Client, filters
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton

app = Client("my_bot")


@app.on_message(filters.command("start"))
async def start(client, message):
    await message.reply(
        "Choose an option:",
        reply_markup=InlineKeyboardMarkup([
            [
                InlineKeyboardButton("Website", url="https://example.com"),
                InlineKeyboardButton("Help", callback_data="help"),
            ],
            [InlineKeyboardButton("About", callback_data="about")],
        ])
    )


app.run()
```

### Installing

```bash
pip install wzgram
```

For better performance:

```bash
pip install wzgram[fast]
```

### Development

```bash
# Clone the repo
git clone https://github.com/rjriajul/wzgram
cd wzgram

# Install uv (if not already)
pip install uv

# Create virtual environment with dev dependencies
uv sync --frozen --extra dev

# Generate TL API types
uv run poe api

# Run tests
uv run poe test
```

### Documentation

Full documentation at **[https://rjriajul.github.io/wzgram](https://rjriajul.github.io/wzgram)**

### Resources

- [Source code](https://github.com/rjriajul/wzgram)
- [Documentation](https://rjriajul.github.io/wzgram)
- [Issue tracker](https://github.com/rjriajul/wzgram/issues)
- [Contributing guide](CONTRIBUTING.md)
