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
  • All types support
  • State management
  • Middleware support
  • Built-in rate limiting
  • Webhook support
  • i18n integration
  • 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

📖 Full documentation
📚 Examples

Contributing

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

Support

🐞 Report a bug
💡 Start a discussion
📮 Join our Telegram Channel

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.3.tar.gz (66.3 kB 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.3-py3-none-any.whl (452.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: surfgram-0.7.3.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • 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.3.tar.gz
Algorithm Hash digest
SHA256 185b6c16b71c9abd32dcfd45e685436e425d87ed82e067de690f656f4422b7fe
MD5 1e03ac0ba65a7767281782f7e8896133
BLAKE2b-256 93e6d13f9d65c24d34f0db6287c54a96d01edfa715d9dfa69025f959ae26f5c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: surfgram-0.7.3-py3-none-any.whl
  • Upload date:
  • Size: 452.5 kB
  • 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2f806acec90bc2be9711a93c7040c9761e7e28ebe0e80b45e4e4b3b92777facc
MD5 00f8bd0bff5331f949953cfa2f35a9a0
BLAKE2b-256 1927843e20b5764fdd5a656707a0ec6dbe0900d4e1a2ebbb3f384ec10b064286

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