Metadata-Version: 2.4
Name: pyjetra
Version: 2.0.4
Summary: Python toolkit for Jetra Messenger: Bot API (sync/async) and User Account API.
Author-email: Ali VEX <lyrdaadhrpyk802@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/lyrdaadhrpyk802-ux/pyjetra
Project-URL: Repository, https://github.com/lyrdaadhrpyk802-ux/pyjetra
Project-URL: Issues, https://github.com/lyrdaadhrpyk802-ux/pyjetra/issues
Project-URL: Jetra, https://jetra.ir/UserBoT
Keywords: jetra,messenger,bot,userbot,api
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Communications :: Chat
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: bot
Requires-Dist: requests>=2.25.0; extra == "bot"
Requires-Dist: aiohttp>=3.8.0; extra == "bot"
Provides-Extra: user
Requires-Dist: websockets>=10.0; extra == "user"
Requires-Dist: pycryptodome>=3.15.0; extra == "user"
Provides-Extra: all
Requires-Dist: requests>=2.25.0; extra == "all"
Requires-Dist: aiohttp>=3.8.0; extra == "all"
Requires-Dist: websockets>=10.0; extra == "all"
Requires-Dist: pycryptodome>=3.15.0; extra == "all"
Dynamic: license-file

# pyjetra

Python toolkit for Jetra Messenger, with two independent clients:

- `pyjetra.botapi`: Bot API wrapper (sync and async), with FSM, filters, inline keyboards and webhooks.
- `pyjetra.userapi`: User account client (MTProto-style protocol, SRP login, 2FA).

## Install

```bash
pip install pyjetra[bot]     # Bot API only
pip install pyjetra[user]    # User account only
pip install pyjetra[all]     # both
```

Requires Python 3.10 or newer.

## Bot API quick start

```python
from pyjetra.botapi import JetraBot, CommandFilter

bot = JetraBot("YOUR_BOT_TOKEN")

@bot.on_message(filters=[CommandFilter("start")])
def start(msg):
    msg.reply("Hello from pyjetra")

bot.poll()
```

## User account quick start

```python
from pyjetra.userapi import JetraClient
```

Session and local database files are stored in `~/.pyjetra` by default. Change the location with the `PYJETRA_DATA_DIR` environment variable. Session files are never part of the package.

## Banner

The banner is not printed on import. Call `pyjetra.botapi.banner.print_banner()` if you want it.

## Disclaimer

pyjetra is not an official Jetra product. You are responsible for your account and for complying with Jetra's terms.

## License

MIT. Author: Ali VEX.
