A convenient shell for the Aiogram library
Project description
Silvergram
Silvergram is a powerful Python library designed to enhance the functionality of the popular Telegram bot framework, Aiogram. It serves as a comprehensive wrapper, providing additional features and simplifying the development process for creating sophisticated Telegram bots
Features
- Enhanced Functionality: Silvergram extends the capabilities of Aiogram, offering additional features such as advanced message sending, phrases and keyboards management, and more
- Simplified Development: With Silvergram, developers can write cleaner and more concise code
- Built-in Utilities: The library includes various built-in utilities for common bot tasks, such as sending messages, managing user interactions, handling callbacks, and working with inline queries
- Flexibility: Silvergram is designed to be highly flexible, allowing developers to easily integrate it into existing Aiogram projects or use it as the foundation for new bot developments
Installation
You can install Silvergram via pip:
pip install silvergram
Quick Start
Here's a simple quick start example of how to use Silvergram to create a basic bot:
from silvergram import Bot
from silvergram.types import Message
TOKEN = "YOUR_TOKEN"
PHRASES = {
"start": "Hello! I am a simple SilverGram bot!"
}
bot = Bot(TOKEN, phrases=PHRASES)
@bot.on_message()
async def on_message_start(message: Message):
chat_id = message.chat.id
await bot.send_current_message(chat_id)
if __name__ == "__main__":
bot.run()
For more detailed usage instructions and examples, please see docs and examples folders
Adding Configuration File
You can create a config.py file using the following command:
python -m silvergram addconfig [-t, --type TYPE] [-p, --path PATH]
Arguments:
-t, --type TYPE [en, ru, empty]
Specify the type of generating. Possible values: 'en' for English comments, 'ru' for Russian comments, 'empty' for adding only the necessary functionality. Default none, which means creating a regular file without comments
-p, --path PATH
Specify the path where the configuration file will be saved. If not provided, the file will be saved in the current working directory
Contributing
Contributions to Silvergram are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on GitHub
License
This project is licensed under the MIT License - see the LICENSE file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file silvergram-0.0.4.tar.gz
.
File metadata
- Download URL: silvergram-0.0.4.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aa95d3321cdcba9ff635c5a60dc80405cbf639767b2af53aa893792db6d279e |
|
MD5 | 5e9bfd0c97c46d25b028a81352990d5f |
|
BLAKE2b-256 | 90d432229983f889715bffd27886913b546d6d1375977b6269deded89e5fea6b |
File details
Details for the file silvergram-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: silvergram-0.0.4-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30b7c1569b55af9ad61ef68910b1570def9e6c425a4374987f178240d18a4548 |
|
MD5 | e4169cfc515a8adc24f74635f6405cb4 |
|
BLAKE2b-256 | 0169f81fa6eb1ea351fc62bc4ad3edbabeb68ec17ed2edd388c284682c642642 |