ptb-easy-bot


Nameptb-easy-bot JSON
Version 0.1.9 PyPI version JSON
download
home_pageNone
SummaryA module for create python-telegram-bot with easy and fast
upload_time2024-10-16 04:25:08
maintainerNone
docs_urlNone
authorPamod Madubahana
requires_pythonNone
licenseNone
keywords python telegram bot easy bots
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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

.. code:: shell

    $ pip install ptb-easy-bot --upgrade

To install a pre-release, use the ``--pre`` `flag <https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-pre>`_ 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()
        

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ptb-easy-bot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, telegram bot, Easy Bots",
    "author": "Pamod Madubahana",
    "author_email": "premiumqtrst@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/9f/bf/8e371ff1e53f9e7f82f1178adb89064e97c58a29ecada34d5205b1c4c3f5/ptb-easy-bot-0.1.9.tar.gz",
    "platform": null,
    "description": "Introduction\n============\n\nWe\u2019ve built the bot framework you\u2019ve been waiting for!\n======================================================\n\nUnlock seamless Telegram bot development with our intuitive, powerful framework. Tap into our thriving community for support and inspiration\n\nInstalling\n==========\n\nYou can install or upgrade ``ptb-easy-bot`` via\n\n.. code:: shell\n\n    $ pip install ptb-easy-bot --upgrade\n\nTo install a pre-release, use the ``--pre`` `flag <https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-pre>`_ in addition.\n\n\nQuick Start\n===========\n::\n\n    from Easy_Bot import update , InlineReplyMarkup , bot\n    from Easy_Bot.ext import Client , HANDLERS , MessagesHandlers , ContextTypes , CallbackContext\n    import asyncio\n    import os\n\n    TOKEN = os.environ.get('TOKEN')\n    WEBHOOK_URL = os.environ.get('WEBHOOK_URL', None)\n    PORT = int(os.environ.get('PORT', '8443'))\n\n    async def main():\n        if WEBHOOK_URL:\n            Bot = bot(TOKEN)\n            await Bot.set_webhook(WEBHOOK_URL + \"/\" + TOKEN)\n        \n    async def start_command(update: update, context: ContextTypes.DEFAULT_TYPE):\n        # await update.message.reply_text(\"Hello..\")\n        keyboard = [\n            ['test - test'],\n            ['test 01 - https://t.me/pamod_madubashana','test 02 - test 02'],\n            ['test 03 - inline_in_other']\n        ]\n\n        reply_markup = InlineReplyMarkup(keyboard)\n        await update.message.reply_text(text=\"hello\",reply_markup=reply_markup)\n\n    async def message_handle_func(update: update, context: ContextTypes.DEFAULT_TYPE):\n        await update.message.reply_text(update.effective_message.text)\n\n    Handlers = HANDLERS(\n        commands = {\n            'start' : start_command,\n        },\n        messages = MessagesHandlers(TEXT=message_handle_func),\n\n    )\n\n    if __name__ == '__main__':\n        loop = asyncio.get_event_loop()\n        loop.run_until_complete(main())\n        app = Client(TOKEN=TOKEN,PORT=PORT,WEBHOOK_URL=WEBHOOK_URL,HANDLERS=Handlers)\n        app.start()\n        \n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A module for create python-telegram-bot with easy and fast",
    "version": "0.1.9",
    "project_urls": null,
    "split_keywords": [
        "python",
        " telegram bot",
        " easy bots"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a62bddd3227b64b9e796d57605b7142189d41965d3229df782229b66e9576604",
                "md5": "25fbe136e3ea032e9735c1f645a10b9b",
                "sha256": "3074bbaed7695100cc795ba5d9b1ab70596d202067a1dfb1d9aca9b52931356e"
            },
            "downloads": -1,
            "filename": "ptb_easy_bot-0.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "25fbe136e3ea032e9735c1f645a10b9b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10963,
            "upload_time": "2024-10-16T04:25:06",
            "upload_time_iso_8601": "2024-10-16T04:25:06.955848Z",
            "url": "https://files.pythonhosted.org/packages/a6/2b/ddd3227b64b9e796d57605b7142189d41965d3229df782229b66e9576604/ptb_easy_bot-0.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9fbf8e371ff1e53f9e7f82f1178adb89064e97c58a29ecada34d5205b1c4c3f5",
                "md5": "0e5ce06337a214a45498abcfe1600809",
                "sha256": "eca33425b9a11fc0c7577798aa57871931f8063417e169f1b60b852f8768bddd"
            },
            "downloads": -1,
            "filename": "ptb-easy-bot-0.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "0e5ce06337a214a45498abcfe1600809",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8730,
            "upload_time": "2024-10-16T04:25:08",
            "upload_time_iso_8601": "2024-10-16T04:25:08.953877Z",
            "url": "https://files.pythonhosted.org/packages/9f/bf/8e371ff1e53f9e7f82f1178adb89064e97c58a29ecada34d5205b1c4c3f5/ptb-easy-bot-0.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-16 04:25:08",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ptb-easy-bot"
}
        
Elapsed time: 0.37321s