Visitar URL original
GitHub - hydrogram/hydrogram at 33037e3b0377cae18b4cad7f57456d9274202c0c · GitHub
Skip to content
hydrogramPublic

About

Sleek, advanced, and asynchronous Telegram MTProto API framework in Python, designed for fluid user and bot interactions.

Topics

Resources

Code of conduct

Contributing

Stars

251 stars

Watchers

4 watching

Forks

Repository files navigation

Hydrogram
Python Framework for the Telegram MTProto API
Homepage • Documentation • Releases • News

Hydrogram

We use Ruff PyPI package version PyPI license PyPI python versions PyPI download month GitHub Actions status

Description

Hydrogram is a Python library for interacting with the Telegram MTProto API. It provides a simple and intuitive interface for developers to leverage the power of Telegram's API in their Python applications.

Installation

To install Hydrogram, you need Python 3 installed on your system. If you don't have Python installed, you can download it from the official website.

To install Hydrogram, use pip:

pip install hydrogram -U

Usage

Here is a basic example of how to use Hydrogram:

from hydrogram import Client, filters

app = Client("my_account")


@app.on_message(filters.private)
async def hello(client, message):
    await message.reply("Hello from Hydrogram!")


app.run()

Features

  • Easy: Makes the Telegram API simple and intuitive, while still allowing advanced usages.
  • Elegant: Low-level details are abstracted and re-presented in a more convenient way.
  • Fast: Boosted up by TgCrypto, a high-performance cryptography library written in C.
  • Type-hinted: Types and methods are all type-hinted, enabling excellent editor support.
  • Async: Fully asynchronous (also usable synchronously if wanted, for convenience).
  • Powerful: Full access to Telegram's API to execute any official client action and more.

Resources

  • The documentation is the technical reference for Hydrogram. It includes detailed usage guides, API reference, and more.
  • The homepage is the official website for Hydrogram. It includes a quickstart guide, a list of features, and more.
  • Our Telegram channel is where we post news and updates about Hydrogram.

Contributing

Contributions of all sizes are welcome. Please review our contribution guidelines for more information. You can also help by reporting bugs or feature requests.

Support

Hydrogram is an open source project. Your support helps us maintain and improve the library. You can support the development of Hydrogram through the following platforms:

License

You may copy, distribute and modify the software provided that modifications are described and licensed for free under LGPL-3. Derivatives works (including modifications or anything statically linked to the library) can only be redistributed under LGPL-3, but applications that use the library don't have to be.

Thanks

  • Pyrogram and its contributors for the inspiration and base code.

About

Sleek, advanced, and asynchronous Telegram MTProto API framework in Python, designed for fluid user and bot interactions.

Topics

Resources

Code of conduct

Contributing

Stars

251 stars

Watchers

4 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages