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.1.tar.gz (23.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.1-py3-none-any.whl (25.6 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: surfgram-0.7.1.tar.gz
  • Upload date:
  • Size: 23.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.1.tar.gz
Algorithm Hash digest
SHA256 c1a9747fe8984ab1a14208cab4f2afd1323846c669582ebf6d96398db27b7ed6
MD5 fc24c3baf49c7900a25b97988d6ada32
BLAKE2b-256 0ba0a0e66ceef15fdb97549b745e3a249f8d3f7fe8c88918a142234b540c4f46

See more details on using hashes here.

File details

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

File metadata

  • Download URL: surfgram-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 25.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9771aec47e9d7aa8da7172a3ab1a7f9b4eb3ed71790be1c731918f146ed8a65e
MD5 9e44ce28f96b0feafb73a4ba0662de3e
BLAKE2b-256 8fcfbdc824a3c89fd360c0661e62c58770505ec6510a04ada2d47ff6edca8e16

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