{"id":13989002,"url":"https://github.com/usernein/pyromod","last_synced_at":"2025-07-22T10:30:53.324Z","repository":{"id":39893790,"uuid":"251753215","full_name":"usernein/pyromod","owner":"usernein","description":"A monkeypatcher add-on for Pyrogram","archived":false,"fork":false,"pushed_at":"2024-11-14T18:46:30.000Z","size":2078,"stargazers_count":238,"open_issues_count":17,"forks_count":69,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-29T07:37:09.669Z","etag":null,"topics":["conversation","listen","monkeypatch","pyrogram","python"],"latest_commit_sha":null,"homepage":"https://pyromod.pauxis.dev/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usernein.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-31T22:02:37.000Z","updated_at":"2024-11-09T07:16:01.000Z","dependencies_parsed_at":"2024-11-14T19:30:24.573Z","dependency_job_id":"ccdb153f-cfda-4685-adb3-253eb4590aec","html_url":"https://github.com/usernein/pyromod","commit_stats":{"total_commits":33,"total_committers":3,"mean_commits":11.0,"dds":"0.36363636363636365","last_synced_commit":"a7baef08085d606b1e491d79b8a7f21e7beea635"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/usernein/pyromod","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernein%2Fpyromod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernein%2Fpyromod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernein%2Fpyromod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernein%2Fpyromod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usernein","download_url":"https://codeload.github.com/usernein/pyromod/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usernein%2Fpyromod/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266474961,"owners_count":23934846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conversation","listen","monkeypatch","pyrogram","python"],"created_at":"2024-08-09T13:01:28.538Z","updated_at":"2025-07-22T10:30:52.981Z","avatar_url":"https://github.com/usernein.png","language":"Python","readme":"# pyromod\n\n\u003cimg src=\"https://img.shields.io/badge/Telegram-2CA5E0?style=flat\u0026logo=telegram\u0026logoColor=white\" height=\"30\" /\u003e \u003cimg src=\"https://img.shields.io/github/v/release/usernein/pyromod\" height=\"30\" /\u003e \u003cimg src=\"https://static.pepy.tech/badge/pyromod\" height=\"30\" /\u003e \u003cimg src=\"https://static.pepy.tech/badge/pyromod/month\" height=\"30\" /\u003e\n\npyromod is a versatile Python add-on for the Pyrogram library, designed to make developing Telegram bots faster and more\nefficient.\n\nIt's based on **monkeypatching**, which means it works together with Pyrogram, rather than being a fork or modified\nversion. It\nadds features to Pyrogram classes on the go, so you don't need to update it every time Pyrogram is updated.\n\nWhether you're building a simple chatbot or a complex form to get multiple responses from the user, pyromod has you\ncovered. It enhances Pyrogram with a range\nof advanced features, simplifies conversation handling, and offers a high degree of customizability.\n\n## Documentation\n\nYou can find the full documentation at [pyromod.pauxis.dev](https://pyromod.pauxis.dev).\n\nAlso feel free to ask any pyromod-related questions on our [Telegram group](https://t.me/pyromodchat).\n\n## Key Features\n\n- **Effortless Bot Development:** pyromod streamlines the process of building conversational Telegram bots, saving you\n  time and effort\n  during development.\n\n- **Advanced Conversation Management:** Managing conversations with users is made easier, allowing you to create dynamic\n  and interactive interactions much easier, without having to save states anywhere, by leveraging the power of\n  async/await syntax.\n\n- **Effortless Inline Keyboards Creation:** Creating inline keyboards is easier than ever with pyromod's inline keyboard\n  helper functions.\n\n- **User-Friendly Pagination:** Enhance the user experience by providing easy navigation tools with the pyromod's\n  pagination\n  helpers.\n\n- **Highly Customizable:** pyromod's configuration options let you customize its behavior to meet your specific project\n  requirements.\n\n## Examples\n\n**Awaiting a single message from a specific chat:**\n\n```python\nresponse = await client.listen(chat_id=chat_id)\n```\n\n**Awaiting a single message from a specific user in a specific chat:**\n\n```python\nresponse = await client.listen(chat_id=chat_id, user_id=user_id)\n```\n\n**Asking the user a question then await for the response:**\n\n```python\nresponse = await client.ask(chat_id=chat_id, text='What is your name?')\n```\n\n**Asking the user a question then await for the response, with a timeout:**\n\n```python\ntry:\n    response = await client.ask(chat_id=chat_id, text='What is your name?', timeout=10)\nexcept ListenerTimeout:\n    await message.reply('You took too long to answer.')\n```\n\n**Full handler example, getting user's name and age with bound method Chat.ask:**\n\n```python\nfrom pyromod import Client, Message\nfrom pyrogram import filters\n\n\n@Client.on_message(filters.command('form'))\nasync def on_form(client: Client, message: Message):\n    chat = message.chat\n\n    name = await chat.ask('What is your name?', filters=filters.text)\n    age = await chat.ask('What is your age?', filters=filters.text)\n\n    await message.reply(f'Your name is {name.text} and you are {age.text} years old.')\n```\n\n**Easier inline keyboard creation:**\n\n```python\nfrom pyromod.helpers import ikb\n\nkeyboard = ikb([\n    [('Button 1', 'callback_data_1'), ('Button 2', 'callback_data_2')],\n    [('Another button', 't.me/pyromodchat', 'url')]\n])\n```\n\n## Installation\n\nTo get started with pyromod, you can install it using pip:\n\n```bash\npip install pyromod\n```\n\nOr poetry:\n\n```bash\npoetry add pyromod\n```\n\nOr rye:\n\n```bash\nrye add pyromod\n```\n\n## Initialization\n\nTo initialize pyromod, on the file that creates the client instance, simply import the Client class from pyromod instead\nof pyrogram:\n\n```python\nfrom pyromod import Client\n```\n\nAnd that's all! You can still use the `Client` class as you would normally do with Pyrogram, but now having all the\nextra features.\n\nYou don't need to change the imports on the plugins files. Even by importing `Client` from pyrogram, the pyromod\nfeatures will be available anyway. In order to monkeyatch pyromod features successfully, it's just required that the\nfirst `Client` class imported to your project code should be from pyromod. Then all the other future `Client` instances\nwill be patched automatically.\n\nYou just need to import from pyromod if you want your IDE to recognize and suggest\nthe extra features based on `pyromod.Client` type.\n\n## Contributing\n\nWe welcome contributions from the community to make pyromod even better.\n\nFeel free to open issues, submit pull requests,\nor contribute in any way that aligns with our goals.\n\n### Copyright \u0026 License\n\nThis project may include snippets of Pyrogram code\n\n- Pyrogram - Telegram MTProto API Client Library for Python. Copyright (C) 2017-2023\n  Dan \u003c\u003chttps://github.com/delivrance\u003e\u003e\n\nLicensed under the terms of the [GNU Lesser General Public License v3 or later (LGPLv3+)](COPYING.lesser)\n\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusernein%2Fpyromod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusernein%2Fpyromod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusernein%2Fpyromod/lists"}