🌐 English
🚀 What is PyJetra?
PyJetra is the first and most complete Python library for building Jetra bots. It provides a clean, modern interface over the Jetra Bot API with full support for both synchronous and asynchronous workflows.
Whether you're building a small personal bot or a large group-management system, PyJetra gives you all the tools you need — without hiding the details.
✨ Features
- 🔄 Sync & Async —
JetraBot(requests) andAsyncJetraBot(aiohttp) - 🎛️ Full Bot API coverage — messages, media, edits, deletes, callbacks, webhooks
- 🧠 FSM state management —
set_state,get_state,clear_state - 🎨 Inline keyboards — multi-level menus, URL buttons, callbacks
- 🧩 Advanced filters —
CommandFilter,TextFilter,RegexFilter - 📨 Edited message events —
@bot.on_edited_messagedecorator - 📎 Full media support — photo, document, video, audio, voice, sticker, animation, location, contact, venue
- 🌐 Webhook ready —
set_webhook,delete_webhook,get_webhook_info - 💬 Rich Message type — parses
reply_to_message, forwards, service events - 🐍 Pythonic — type hints, clean dataclasses, no boilerplate
📦 Installation
pip install pyjetra
⚡ Quick Start
from pyjetra import JetraBot, CommandFilter, InlineKeyboardMarkup, InlineKeyboardButton
bot = JetraBot("YOUR_BOT_TOKEN")
@bot.on_message(filters=[CommandFilter("start")])
def start(msg):
keyboard = InlineKeyboardMarkup([
[InlineKeyboardButton(text="Open Jetra", url="https://jetra.ir")],
[InlineKeyboardButton(text="About", callback_data="about")],
])
msg.reply("Welcome to PyJetra!", reply_markup=keyboard)
@bot.on_callback_query()
def on_button(cb):
if cb.data == "about":
cb.answer("PyJetra v1.4.0 — Modern Python wrapper for Jetra Bot API")
bot.poll()
🧠 FSM Example
@bot.on_message(filters=[CommandFilter("register")])
def register(msg):
bot.set_state(msg.from_user.id, "waiting_for_name")
msg.reply("What's your name?")
@bot.on_message()
def handle_name(msg):
if bot.get_state(msg.from_user.id) == "waiting_for_name":
bot.clear_state(msg.from_user.id)
msg.reply(f"Nice to meet you, {msg.text}!")
📚 Documentation
· 📦 PyPI: pypi.org/project/pyjetra · 📁 GitHub: github.com/lyrdaadhrpyk802-ux/pyjetra · 🧪 Examples: see the tests/ folder for working scripts
🌐 فارسی
🚀 PyJetra چیه؟
PyJetra اولین و کاملترین کتابخانهی پایتون برای ساخت رباتهای جترا هست. یه رابط تمیز و مدرن روی Bot API جترا فراهم میکنه، با پشتیبانی کامل از هر دو حالت همگام (Sync) و ناهمگام (Async).
چه یه ربات شخصی کوچیک بسازی، چه یه سیستم مدیریت گروه بزرگ، PyJetra همهی ابزارهای لازم رو در اختیارت میذاره.
✨ امکانات
· 🔄 همگام و ناهمگام — JetraBot (requests) و AsyncJetraBot (aiohttp) · 🎛️ پوشش کامل Bot API — پیام، رسانه، ویرایش، حذف، کلیکها، وبهوک · 🧠 مدیریت وضعیت (FSM) — set_state, get_state, clear_state · 🎨 دکمههای شیشهای — منوهای چندسطحی، دکمههای URL، کالبک · 🧩 فیلترهای پیشرفته — CommandFilter, TextFilter, RegexFilter · 📨 رویداد ویرایش پیام — دکوراتور @bot.on_edited_message · 📎 پشتیبانی کامل رسانه — عکس، فایل، ویدیو، صدا، ویس، استیکر، انیمیشن، موقعیت، مخاطب، مکان · 🌐 آمادهی Webhook — set_webhook, delete_webhook, get_webhook_info · 💬 تایپ کامل Message — پارس reply_to_message، فوروارد، رویدادهای سرویس · 🐍 پایتونیک — type hint، dataclass تمیز، بدون boilerplate
📦 نصب
pip install pyjetra
⚡ شروع سریع
from pyjetra import JetraBot, CommandFilter
bot = JetraBot("YOUR_BOT_TOKEN")
@bot.on_message(filters=[CommandFilter("start")])
def start(msg):
msg.reply("سلام از PyJetra!")
bot.poll()
🧠 مثال FSM
@bot.on_message(filters=[CommandFilter("register")])
def register(msg):
bot.set_state(msg.from_user.id, "waiting_for_name")
msg.reply("اسمت چیه؟")
@bot.on_message()
def handle_name(msg):
if bot.get_state(msg.from_user.id) == "waiting_for_name":
bot.clear_state(msg.from_user.id)
msg.reply(f"خوشبختم، {msg.text}!")
📚 مستندات
· 📦 PyPI: pypi.org/project/pyjetra · 📁 GitHub: github.com/lyrdaadhrpyk802-ux/pyjetra · 🧪 مثالها: پوشهی tests/ رو ببین
👤 About the Developer
Ali VEX
Founder & Lead Developer of PyJetra Bot Developer • Python Enthusiast • Jetra Community Member
🧭 Bio
Ali VEX is a passionate Python developer who created PyJetra — the first and most complete Python library for the Jetra Bot API. He is active in the Jetra developer community and maintains JetraGuard, a full-featured group-management bot built on top of PyJetra as a real-world showcase.
His goal: make Jetra bot development accessible, clean, and fun for every developer — from beginners to professionals.
📬 Connect with Ali VEX
Platform Link 💬 Jetra Profile @UserBoT 📢 PyJetra Channel @pyJetra 👥 JetraGuard Community @Chatpyjetra 🐙 GitHub lyrdaadhrpyk802-ux 📧 Email lyrdaadhrpyk802@gmail.com 📦 PyPI pypi.org/project/pyjetra
💬 Community & Support
Got questions, ideas, or want to share what you built with PyJetra? Join the community on Jetra:
· 📢 Channel — https://jetra.ir/pyJetra — release notes, updates, tutorials · 👥 Chat Group — https://jetra.ir/Chatpyjetra — ask questions, report bugs, share bots · 🐛 Issues — https://github.com/lyrdaadhrpyk802-ux/pyjetra/issues
Every bit of feedback helps shape the next version of PyJetra. ❤️
📜 License
This project is licensed under the MIT License — see the LICENSE file for details.
Made with ❤️ for the Jetra community
ساختهشده با ❤️ برای جامعهی جترا
Metadata
Release files for pyjetra 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyjetra-1.6.0.tar.gz | 25.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyjetra-1.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.6 kB
Release files / pyjetra-1.6.0.tar.gz
| Download URL | pyjetra-1.6.0.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f19f03ce9de53cb11af3cd76193b85f1ff0ce7d599ae2368dd56cf549fadaeb
|
|
BLAKE2b-256 checksum How to use checksums |
9466f2fdf320e92fd02bc304ba9860605eba2c63cd3f7e3f265dbaddd846abfc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / pyjetra-1.6.0-py3-none-any.whl
| Download URL | pyjetra-1.6.0-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c300a17f805381e0e82e9d8b865f1f90eb1f29542f16b25e027a1d538efbcfad
|
|
BLAKE2b-256 checksum How to use checksums |
70b7cf0e78023c6236a0fc759892f3e50370ad71f93d480e1682d3202315a66e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for pyjetra 1.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.