Git Product home page Git Product logo

tg_api_rtd's Introduction

Tg API

PyPI - Downloads PyPI - License

Библиотека Tg API упрощает работу с веб-API Telegram. Она предоставляет тонкую обёртку над веб API Telegram и библиотекой HTTPX. Библиотека Tg API добавляет к обычным возможностям HTTPX свои схемы данных и удобные часто используемые функции, но не мешает, при необходимости, спускаться ниже на уровень HTTP-запросов.

Пример отправки пользователю текстового сообщения:

from tg_api import SyncTgClient, SendMessageRequest


with SyncTgClient.setup(token):
    tg_request = SendMessageRequest(chat_id=tg_chat_id, text='Message proofs high level usage.')
    tg_request.send()

Ключевые возможности библиотеки

Ключевые возможности библиотеки Tg API:

  • Поддержка синхронных и асинхронных запросов к API
  • Shortcuts для часто используемых запросов
  • Лёгкий доступ к боту из любого места в коде
  • Наглядные схемы данных для всех типов запросов и ответов API
  • Аннотация типов для удобства работы с IDE
  • Простое низкоуровневое API для кастомизации запросов к API
  • Набор инструментов для удобной работы с исключениями

Как установить

Библиотека доступна на PyPI:

$ python -m pip install tg-api

Документация

Документация доступна на Read the Docs: https://tg-api.readthedocs.io/en/latest/.

Разработчикам библиотеки Tg API

Инструкции и справочная информация для разработчиков библиотеки Tg API собраны в отдельном документе CONTRIBUTING.md.

tg_api_rtd's People

Contributors

pelid avatar kirillyabl avatar zusmanone avatar eshinanase avatar voron434 avatar sadrus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.