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.0.tar.gz (21.6 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.0-py3-none-any.whl (23.6 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: surfgram-0.7.0.tar.gz
  • Upload date:
  • Size: 21.6 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.0.tar.gz
Algorithm Hash digest
SHA256 fac3b4de75de27ff5a201f0e831ee974e0effc995a5665429f3f6c32a49b6b2f
MD5 832e397248de4346823b76cb5c3a8b29
BLAKE2b-256 6e39b12b1954c8aaf5f47dbe4b919e5a3237efbcb8928b1651dad40a92b5dbc1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: surfgram-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 23.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 044227a2b9006837f056dc8f13bc13cde2674c32000a60a345841dff03c3326b
MD5 d5f8e36cdc1718a6c2aa9bb8ab6923ed
BLAKE2b-256 647790f9972e2636590e8d061614eb8a6ea2c99ad043224ad5d283f7eac28f3a

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