Skip to main content

Introduction

We’ve built the bot framework you’ve been waiting for!

Unlock seamless Telegram bot development with our intuitive, powerful framework. Tap into our thriving community for support and inspiration

Installing

You can install or upgrade ptb-easy-bot via

$ pip install ptb-easy-bot --upgrade

To install a pre-release, use the --pre flag in addition.

Quick Start

from Easy_Bot import update , InlineReplyMarkup , bot
from Easy_Bot.ext import Client , HANDLERS , MessagesHandlers , ContextTypes , CallbackContext
import asyncio
import os

TOKEN = os.environ.get('TOKEN')
WEBHOOK_URL = os.environ.get('WEBHOOK_URL', None)
PORT = int(os.environ.get('PORT', '8443'))

async def main():
    if WEBHOOK_URL:
        Bot = bot(TOKEN)
        await Bot.set_webhook(WEBHOOK_URL + "/" + TOKEN)

async def start_command(update: update, context: ContextTypes.DEFAULT_TYPE):
    # await update.message.reply_text("Hello..")
    keyboard = [
        ['test - test'],
        ['test 01 - https://t.me/pamod_madubashana','test 02 - test 02'],
        ['test 03 - inline_in_other']
    ]

    reply_markup = InlineReplyMarkup(keyboard)
    await update.message.reply_text(text="hello",reply_markup=reply_markup)

async def message_handle_func(update: update, context: ContextTypes.DEFAULT_TYPE):
    await update.message.reply_text(update.effective_message.text)

Handlers = HANDLERS(
    commands = {
        'start' : start_command,
    },
    messages = MessagesHandlers(TEXT=message_handle_func),

)

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())
    app = Client(TOKEN=TOKEN,PORT=PORT,WEBHOOK_URL=WEBHOOK_URL,HANDLERS=Handlers)
    app.start()

Metadata

Release files for ptb-easy-bot 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ptb-easy-bot 0.1.9
File Size Uploaded
ptb-easy-bot-0.1.9.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ptb-easy-bot 0.1.9
File Interpreter ABI Platform
ptb_easy_bot-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / ptb-easy-bot-0.1.9.tar.gz

Download URL ptb-easy-bot-0.1.9.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
eca33425b9a11fc0c7577798aa57871931f8063417e169f1b60b852f8768bddd
BLAKE2b-256 checksum
How to use checksums
9fbf8e371ff1e53f9e7f82f1178adb89064e97c58a29ecada34d5205b1c4c3f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release files / ptb_easy_bot-0.1.9-py3-none-any.whl

Download URL ptb_easy_bot-0.1.9-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3074bbaed7695100cc795ba5d9b1ab70596d202067a1dfb1d9aca9b52931356e
BLAKE2b-256 checksum
How to use checksums
a62bddd3227b64b9e796d57605b7142189d41965d3229df782229b66e9576604
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page