Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

silvergram-0.0.3.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

silvergram-0.0.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file silvergram-0.0.3.tar.gz.

File metadata

  • Download URL: silvergram-0.0.3.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

Hashes for silvergram-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bac04f131f4aa46ddf69060b6350d3d8a7b7099eed89975ddd917e75d464ec49
MD5 f30051eb5063873b818612151dcc5a0e
BLAKE2b-256 48f71f89b24c0ee90f33978f7be86abbba56e783929e3dba5270d7d0c858ccc3

See more details on using hashes here.

File details

Details for the file silvergram-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: silvergram-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for silvergram-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 77efab6628e64bcb0f493050db2e1ab3ce6a30fd0f06049560ddde93c797cc81
MD5 80434f1bcfd946b2252041ce606c2298
BLAKE2b-256 2fa68e564526ed64ef5689f1d2cba3baedc4276a0eed60e0a7d277758a21afad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page