Skip to main content

Modern asynchronous Telegram bot framework

Project description

Surfgram

Surfgram Logo
PyPI Version Python 3.8+ Telegram Bot API 9.0+ MIT License

Overview

Surfgram is a high-level, object-oriented framework for building scalable Telegram bots with minimal boilerplate. It's designed for developers who want a clean architecture without sacrificing flexibility.

Key Features

  • ✅ Pure OOP – Classes and dependency injection
  • ✅ Fast Setup – Get a bot running in under 20 lines of code
  • ✅ Extensible – Add custom handlers, filters, and database integrations
  • ✅ Async-Ready – Built with asyncio for high performance
  • ✅ Full support for Telegram Bot API 9.0+

Development Roadmap

  • Core framework implementation
  • Basic command handlers
  • Middleware support
  • Advanced state management
  • Built-in rate limiting
  • Webhook support
  • i18n integration
  • Built-in admin panel
  • Plugin system

Quick Start

  1. Install using PIP:

    pip install surfgram
    
  2. Create your first bot:

    from surfgram import APIObject, Bot
    from surfgram.types import Command
    from typing import Callable, List
    
    class StartCommand(Command):
        @property
        def __names__(self) -> List[str]:
            return ["start"]
    
        @property
        def __callback__(self) -> Callable:
            return self.handle
    
        async def handle(
            self,
            update: APIObject,
            bot: Bot
        ) -> None:
            await bot.send_message(
                chat_id=update.message.chat.id,
                text="Hello, world!"
            )
    

Documentation

Contributing

We welcome contributions! Please read our Contributing Guidelines for more information on how to get started.

Support

License

MIT License. See LICENSE for more 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

surfgram-0.7.2.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

surfgram-0.7.2-py3-none-any.whl (2.7 MB view details)

Uploaded Python 3

File details

Details for the file surfgram-0.7.2.tar.gz.

File metadata

  • Download URL: surfgram-0.7.2.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.6 Windows/11

File hashes

Hashes for surfgram-0.7.2.tar.gz
Algorithm Hash digest
SHA256 8d9fcb2dff01ce579e4e0cd39f8016c04bb2437a387b7494a5c9f3e7325343b7
MD5 adead8abfc022188c372e135ed79ef01
BLAKE2b-256 08565350634a130ad8eaf03f26540985f17599a49c0785931c0e6c501856b970

See more details on using hashes here.

File details

Details for the file surfgram-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: surfgram-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.6 Windows/11

File hashes

Hashes for surfgram-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e28d083a4675bf2d4549d15a6b9cf49fd22c5c8403380c5b9bcd6dc1fa89ddc6
MD5 f2e5e986b89236883441ef697857ff24
BLAKE2b-256 2208b7b632236abedeeb460efcf1a5d9abe207b8507fb98f28a8a5d85b37286b

See more details on using hashes here.

Supported by

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