Clean project

This commit is contained in:
jrootjunior 2019-11-15 12:17:57 +02:00
parent a83dd3ca63
commit bdae5fb026
259 changed files with 1303 additions and 21135 deletions

View file

@ -1,20 +0,0 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = aiogram
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

13
docs/index.md Normal file
View file

@ -0,0 +1,13 @@
# Overview
Documentation for version 3.0
[![MIT License](https://img.shields.io/pypi/l/aiogram.svg?style=flat-square)](https://opensource.org/licenses/MIT)
[![Supported python versions](https://img.shields.io/pypi/pyversions/aiogram.svg?style=flat-square)](https://pypi.python.org/pypi/aiogram)
[![Telegram Bot API](https://img.shields.io/badge/Telegram%20Bot%20API-4.4-blue.svg?style=flat-square&logo=telegram)](https://core.telegram.org/bots/api)
[![PyPi Package Version](https://img.shields.io/pypi/v/aiogram.svg?style=flat-square)](https://pypi.python.org/pypi/aiogram)
[![PyPi status](https://img.shields.io/pypi/status/aiogram.svg?style=flat-square)](https://pypi.python.org/pypi/aiogram)
[![Downloads](https://img.shields.io/pypi/dm/aiogram.svg?style=flat-square)](https://pypi.python.org/pypi/aiogram)
[![\[Telegram\] aiogram live](https://img.shields.io/badge/telegram-aiogram-blue.svg?style=flat-square)](https://t.me/aiogram_live)
**aiogram** modern and fully asynchronous framework for [Telegram Bot API](https://core.telegram.org/bots/api) written in Python 3.7 with [asyncio](https://docs.python.org/3/library/asyncio.html) and [aiohttp](https://github.com/aio-libs/aiohttp). It helps you to make your bots faster and simpler.

14
docs/install.md Normal file
View file

@ -0,0 +1,14 @@
# Installation Guide
## Using PIP
```bash
pip install -U aiogram
```
## Using Pipenv
```bash
pipenv install aiogram
```
## Using AUR
*aiogram* is also available in Arch User Repository, so you can install this library on any Arch-based distribution like ArchLinux, Antergos, Manjaro, etc. To do this, use your favorite AUR-helper and install [python-aiogram](https://aur.archlinux.org/packages/python-aiogram/) package.

View file

@ -1,177 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# aiogram documentation build configuration file, created by
# sphinx-quickstart on Sat Jun 3 11:22:58 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import datetime
import os
import sys
from pip._vendor.pkg_resources import parse_version
sys.path.insert(0, os.path.abspath('../..'))
import aiogram
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx.ext.autodoc',
'sphinx.ext.ifconfig',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'aiogram'
author = 'Illemius / Alex Root Junior'
copyright = f'{datetime.datetime.now().year}, {author}'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
parsed_version = parse_version(aiogram.__version__)
# The short X.Y version.
version = parsed_version.base_version
# The full version, including alpha/beta/rc tags.
release = aiogram.__version__
releaselevel = 'dev' if parsed_version.dev else 'alpha' \
if 'a' in version else 'beta' \
if 'b' in version else 'stable'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
html_logo = 'static/logo.png'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['static']
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = 'aiogramdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'aiogram.tex', 'aiogram Documentation',
'Illemius / Alex Root Junior', 'manual'),
]
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'aiogram', 'aiogram Documentation',
[author], 1)
]
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'aiogram', 'aiogram Documentation',
author, 'aiogram', 'Asynchonyously Python framework for Telegram Bot API',
'Miscellaneous'),
]
autoclass_content = "both"
autodoc_member_order = "bysource"
# autodoc_default_flags = [
# "members",
# "no-undoc-members",
# "show-inheritance",
# "inherited-members",
# ]

View file

@ -1,4 +0,0 @@
Contribution
============
TODO

View file

@ -1,183 +0,0 @@
=======
Filters
=======
Basics
======
Filter factory greatly simplifies the reuse of filters when registering handlers.
Filters factory
===============
.. autoclass:: aiogram.dispatcher.filters.factory.FiltersFactory
:members:
:show-inheritance:
Builtin filters
===============
``aiogram`` has some builtin filters. Here you can see all of them:
Command
-------
.. autoclass:: aiogram.dispatcher.filters.builtin.Command
:members:
:show-inheritance:
CommandStart
------------
.. autoclass:: aiogram.dispatcher.filters.builtin.CommandStart
:members:
:show-inheritance:
CommandHelp
-----------
.. autoclass:: aiogram.dispatcher.filters.builtin.CommandHelp
:members:
:show-inheritance:
CommandSettings
---------------
.. autoclass:: aiogram.dispatcher.filters.builtin.CommandSettings
:members:
:show-inheritance:
CommandPrivacy
--------------
.. autoclass:: aiogram.dispatcher.filters.builtin.CommandPrivacy
:members:
:show-inheritance:
Text
----
.. autoclass:: aiogram.dispatcher.filters.builtin.Text
:members:
:show-inheritance:
HashTag
-------
.. autoclass:: aiogram.dispatcher.filters.builtin.HashTag
:members:
:show-inheritance:
Regexp
------
.. autoclass:: aiogram.dispatcher.filters.builtin.Regexp
:members:
:show-inheritance:
RegexpCommandsFilter
--------------------
.. autoclass:: aiogram.dispatcher.filters.builtin.RegexpCommandsFilter
:members:
:show-inheritance:
ContentTypeFilter
-----------------
.. autoclass:: aiogram.dispatcher.filters.builtin.ContentTypeFilter
:members:
:show-inheritance:
StateFilter
-----------
.. autoclass:: aiogram.dispatcher.filters.builtin.StateFilter
:members:
:show-inheritance:
ExceptionsFilter
----------------
.. autoclass:: aiogram.dispatcher.filters.builtin.ExceptionsFilter
:members:
:show-inheritance:
IDFilter
----------------
.. autoclass:: aiogram.dispatcher.filters.builtin.IDFilter
:members:
:show-inheritance:
AdminFilter
----------------
.. autoclass:: aiogram.dispatcher.filters.builtin.AdminFilter
:members:
:show-inheritance:
IsReplyFilter
-------------
.. autoclass:: aiogram.dispatcher.filters.filters.IsReplyFilter
:members:
:show-inheritance:
Making own filters (Custom filters)
===================================
Own filter can be:
- any callable object
- any async function
- any anonymous function (Example: ``lambda msg: msg.text == 'spam'``)
- Subclass of :obj:`AbstractFilter`, :obj:`Filter` or :obj:`BoundFilter`
AbstractFilter
--------------
.. autoclass:: aiogram.dispatcher.filters.filters.AbstractFilter
:members:
:show-inheritance:
Filter
------
.. autoclass:: aiogram.dispatcher.filters.filters.Filter
:members:
:show-inheritance:
BoundFilter
-----------
.. autoclass:: aiogram.dispatcher.filters.filters.BoundFilter
:members:
:show-inheritance:
.. code-block:: python
class ChatIdFilter(BoundFilter):
key = 'chat_id'
def __init__(self, chat_id: typing.Union[typing.Iterable, int]):
if isinstance(chat_id, int):
chat_id = [chat_id]
self.chat_id = chat_id
def check(self, message: types.Message) -> bool:
return message.chat.id in self.chat_id
dp.filters_factory.bind(ChatIdFilter, event_handlers=[dp.message_handlers])

View file

@ -1,45 +0,0 @@
====================
Finite state machine
====================
Storage
=======
Coming soon...
Available storage's
-------------------
Coming soon...
Memory storage
~~~~~~~~~~~~~~
Coming soon...
Redis storage
~~~~~~~~~~~~~
Coming soon...
Rethink DB storage
~~~~~~~~~~~~~~~~~~
Coming soon...
Making own storage's
~~~~~~~~~~~~~~~~~~~~
Coming soon...
States
======
Coming soon...
State utils
===========
Coming soon...
State
-----
Coming soon...
States group
------------
Coming soon...

View file

@ -1,33 +0,0 @@
==========
Dispatcher
==========
.. toctree::
filters
fsm
middleware
webhook
Basics
======
Coming soon...
Available handlers
==================
Coming soon...
Handler class
-------------
Coming soon...
Features
========
Coming soon...
Dispatcher class
================
.. autoclass:: aiogram.Dispatcher
:members:
:show-inheritance:

View file

@ -1,15 +0,0 @@
==========
Middleware
==========
Bases
=====
Coming soon...
Making own middleware's
=======================
Coming soon...
Available middleware's
======================
Coming soon...

View file

@ -1,16 +0,0 @@
=======
Webhook
=======
Coming soon...
Bases
=====
Coming soon...
Security
========
Coming soon...
Making requests when getting updates
====================================
Coming soon...

View file

@ -1,28 +0,0 @@
.. Autogenerated file at 2018-10-28 19:31:48.335963
=========================
Advanced executor example
=========================
!/usr/bin/env python3
**This example is outdated**
In this example used ArgumentParser for configuring Your bot.
Provided to start bot with webhook:
python advanced_executor_example.py \
--token TOKEN_HERE \
--host 0.0.0.0 \
--port 8084 \
--host-name example.com \
--webhook-port 443
Or long polling:
python advanced_executor_example.py --token TOKEN_HERE
So... In this example found small trouble:
can't get bot instance in handlers.
If you want to automatic change getting updates method use executor utils (from aiogram.utils.executor)
TODO: Move token to environment variables.
.. literalinclude:: ../../../examples/advanced_executor_example.py
:caption: advanced_executor_example.py
:language: python
:linenos:
:lines: 25-

View file

@ -1,10 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.593501
=================
Broadcast example
=================
.. literalinclude:: ../../../examples/broadcast_example.py
:caption: broadcast_example.py
:language: python
:linenos:

View file

@ -1,13 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.558059
===================
Check user language
===================
Babel is required.
.. literalinclude:: ../../../examples/check_user_language.py
:caption: check_user_language.py
:language: python
:linenos:
:lines: 5-

View file

@ -1,9 +0,0 @@
Echo bot
========
Very simple example of the bot which will sent text of the received messages to the sender
.. literalinclude:: ../../../examples/echo_bot.py
:caption: echo_bot.py
:language: python
:linenos:

View file

@ -1,10 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.595032
============================
Finite state machine example
============================
.. literalinclude:: ../../../examples/finite_state_machine_example.py
:caption: finite_state_machine_example.py
:language: python
:linenos:

View file

@ -1,28 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.591007
============
I18n example
============
Internalize your bot
Step 1: extract texts
# pybabel extract i18n_example.py -o locales/mybot.pot
Step 2: create *.po files. For e.g. create en, ru, uk locales.
# echo {en,ru,uk} | xargs -n1 pybabel init -i locales/mybot.pot -d locales -D mybot -l
Step 3: translate texts
Step 4: compile translations
# pybabel compile -d locales -D mybot
Step 5: When you change the code of your bot you need to update po & mo files.
Step 5.1: regenerate pot file:
command from step 1
Step 5.2: update po files
# pybabel update -d locales -D mybot -i locales/mybot.pot
Step 5.3: update your translations
Step 5.4: compile mo files
command from step 4
.. literalinclude:: ../../../examples/i18n_example.py
:caption: i18n_example.py
:language: python
:linenos:
:lines: 22-

View file

@ -1,21 +0,0 @@
========
Examples
========
.. toctree::
echo_bot
inline_bot
advanced_executor_example
proxy_and_emojize
finite_state_machine_example
throtling_example
i18n_example
regexp_commands_filter_example
check_user_language
middleware_and_antiflood
webhook_example
webhook_example_2
payments
broadcast_example
media_group

View file

@ -1,10 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.561907
==========
Inline bot
==========
.. literalinclude:: ../../../examples/inline_bot.py
:caption: inline_bot.py
:language: python
:linenos:

View file

@ -1,10 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.566615
===========
Media group
===========
.. literalinclude:: ../../../examples/media_group.py
:caption: media_group.py
:language: python
:linenos:

View file

@ -1,10 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.560132
========================
Middleware and antiflood
========================
.. literalinclude:: ../../../examples/middleware_and_antiflood.py
:caption: middleware_and_antiflood.py
:language: python
:linenos:

View file

@ -1,10 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.579017
========
Payments
========
.. literalinclude:: ../../../examples/payments.py
:caption: payments.py
:language: python
:linenos:

View file

@ -1,10 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.555359
=================
Proxy and emojize
=================
.. literalinclude:: ../../../examples/proxy_and_emojize.py
:caption: proxy_and_emojize.py
:language: python
:linenos:

View file

@ -1,10 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.568530
==============================
Regexp commands filter example
==============================
.. literalinclude:: ../../../examples/regexp_commands_filter_example.py
:caption: regexp_commands_filter_example.py
:language: python
:linenos:

View file

@ -1,14 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.563878
=================
Throtling example
=================
Example for throttling manager.
You can use that for flood controlling.
.. literalinclude:: ../../../examples/throtling_example.py
:caption: throtling_example.py
:language: python
:linenos:
:lines: 7-

View file

@ -1,13 +0,0 @@
.. Autogenerated file at 2018-10-28 19:31:48.341172
===============
Webhook example
===============
Example outdated
.. literalinclude:: ../../../examples/webhook_example.py
:caption: webhook_example.py
:language: python
:linenos:
:lines: 5-

View file

@ -1,10 +0,0 @@
.. Autogenerated file at 2018-09-08 02:07:37.576034
=================
Webhook example 2
=================
.. literalinclude:: ../../../examples/webhook_example_2.py
:caption: webhook_example_2.py
:language: python
:linenos:

View file

@ -1,93 +0,0 @@
Welcome to aiogram's documentation!
===================================
.. image:: https://img.shields.io/badge/telegram-aiogram-blue.svg?style=flat-square
:target: https://t.me/aiogram_live
:alt: [Telegram] aiogram live
.. image:: https://img.shields.io/pypi/v/aiogram.svg?style=flat-square
:target: https://pypi.python.org/pypi/aiogram
:alt: PyPi Package Version
.. image:: https://img.shields.io/pypi/status/aiogram.svg?style=flat-square
:target: https://pypi.python.org/pypi/aiogram
:alt: PyPi status
.. image:: https://img.shields.io/pypi/dm/aiogram.svg?style=flat-square
:target: https://pypi.python.org/pypi/aiogram
:alt: PyPi downloads
.. image:: https://img.shields.io/pypi/pyversions/aiogram.svg?style=flat-square
:target: https://pypi.python.org/pypi/aiogram
:alt: Supported python versions
.. image:: https://img.shields.io/badge/Telegram%20Bot%20API-4.4-blue.svg?style=flat-square&logo=telegram
:target: https://core.telegram.org/bots/api
:alt: Telegram Bot API
.. image:: https://img.shields.io/readthedocs/aiogram?style=flat-square
:target: http://aiogram.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://img.shields.io/github/issues/aiogram/aiogram.svg?style=flat-square
:target: https://github.com/aiogram/aiogram/issues
:alt: Github issues
.. image:: https://img.shields.io/pypi/l/aiogram.svg?style=flat-square
:target: https://opensource.org/licenses/MIT
:alt: MIT License
**aiogram** is a pretty simple and fully asynchronous framework for `Telegram Bot API <https://core.telegram.org/bots/api>`_ written in Python 3.7 with `asyncio <https://docs.python.org/3/library/asyncio.html>`_ and `aiohttp <https://github.com/aio-libs/aiohttp>`_. It helps you to make your bots faster and simpler.
Official aiogram resources
--------------------------
- News: `@aiogram_live <https://t.me/aiogram_live>`_
- Community: `@aiogram <https://t.me/aiogram>`_
- Russian community: `@aiogram_ru <https://t.me/aiogram_ru>`_
- Pip: `aiogram <https://pypi.python.org/pypi/aiogram>`_
- Docs: `ReadTheDocs <http://aiogram.readthedocs.io>`_
- Source: `Github repo <https://github.com/aiogram/aiogram>`_
- Issues/Bug tracker: `Github issues tracker <https://github.com/aiogram/aiogram/issues>`_
- Test bot: `@aiogram_bot <https://t.me/aiogram_bot>`_
Features
--------
- Asynchronous
- Awesome
- Makes things faster
- Has `FSM <https://en.wikipedia.org/wiki/Finite-state_machine>`_
- Can reply into webhook. (In other words `make requests in response to updates <https://core.telegram.org/bots/faq#how-can-i-make-requests-in-response-to-updates>`_)
Contribute
----------
- `Issue Tracker <https://github.com/aiogram/aiogram/issues>`_
- `Source Code <https://github.com/aiogram/aiogram.git>`_
Contents
--------
.. toctree::
install
quick_start
migration_1_to_2
telegram/index
dispatcher/index
utils/index
examples/index
contribution
links
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View file

@ -1,97 +0,0 @@
Installation Guide
==================
Using PIP
---------
.. code-block:: bash
$ pip install -U aiogram
Using Pipenv
------------
.. code-block:: bash
$ pipenv install aiogram
Using AUR
---------
*aiogram* is also available in Arch User Repository, so you can install this library on any Arch-based distribution like ArchLinux, Antergos, Manjaro, etc. To do this, use your favorite AUR-helper and install `python-aiogram <https://aur.archlinux.org/packages/python-aiogram/>`_ package.
From sources
------------
Development versions:
.. code-block:: bash
$ git clone https://github.com/aiogram/aiogram.git
$ cd aiogram
$ python setup.py install
Or if you want to install stable version (The same with version form PyPi):
.. code-block:: bash
$ git clone https://github.com/aiogram/aiogram.git
$ cd aiogram
$ git checkout master
$ python setup.py install
Recommendations
---------------
You can speedup your bots by following next instructions:
- Use `uvloop <https://github.com/MagicStack/uvloop>`_ instead of default asyncio loop.
*uvloop* is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood.
**Installation:**
.. code-block:: bash
$ pip install uvloop
- Use `ujson <https://github.com/esnme/ultrajson>`_ instead of default json module.
*UltraJSON* is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 2.5+ and 3.
**Installation:**
.. code-block:: bash
$ pip install ujson
- Use aiohttp speedups
- Use `cchardet <https://github.com/PyYoshi/cChardet>`_ instead of chardet module.
*cChardet* is high speed universal character encoding detector.
**Installation:**
.. code-block:: bash
$ pip install cchardet
- Use `aiodns <https://github.com/saghul/aiodns>`_ for speeding up DNS resolving.
*aiodns* provides a simple way for doing asynchronous DNS resolutions.
**Installation:**
.. code-block:: bash
$ pip install aiodns
- Installing speedups altogether.
The following will get you ``aiohttp`` along with ``cchardet``, ``aiodns`` and ``brotlipy`` in one bundle.
**Installation:**
.. code-block:: bash
$ pip install aiohttp[speedups]
In addition, you don't need do nothing, *aiogram* is automatically starts using that if is found in your environment.

View file

@ -1,4 +0,0 @@
Links
=====
TODO

View file

@ -1,260 +0,0 @@
==========================
Migration FAQ (1.4 -> 2.0)
==========================
This update make breaking changes in aiogram API and drop backward capability with previous versions of framework.
From this point aiogram supports only Python 3.7 and newer.
Changelog
=========
- Used contextvars instead of `aiogram.utils.context`;
- Implemented filters factory;
- Implemented new filters mechanism;
- Allowed to customize command prefix in CommandsFilter;
- Implemented mechanism of passing results from filters (as dicts) as kwargs in handlers (like fixtures in pytest);
- Implemented states group feature;
- Implemented FSM storage's proxy;
- Changed files uploading mechanism;
- Implemented pipe for uploading files from URL;
- Implemented I18n Middleware;
- Errors handlers now should accept only two arguments (current update and exception);
- Used `aiohttp_socks` instead of `aiosocksy` for Socks4/5 proxy;
- `types.ContentType` was divided to `types.ContentType` and `types.ContentTypes`;
- Allowed to use rapidjson instead of ujson/json;
- `.current()` method in bot and dispatcher objects was renamed to `get_current()`;
Instructions
============
Contextvars
-----------
Context utility (`aiogram.utils.context`) now is removed due to new features of Python 3.7 and all subclasses of :obj:`aiogram.types.base.TelegramObject`, :obj:`aiogram.Bot` and :obj:`aiogram.Dispatcher` has `.get_current()` and `.set_current()` methods for getting/setting contextual instances of objects.
Example:
.. code-block:: python
async def my_handler(message: types.Message):
bot = Bot.get_current()
user = types.User.get_current()
...
Filters
-------
Custom filters
~~~~~~~~~~~~~~
Now `func` keyword argument can't be used for passing filters to the list of filters instead of that you can pass the filters as arguments:
.. code-block:: python
@dp.message_handler(lambda message: message.text == 'foo')
@dp.message_handler(types.ChatType.is_private, my_filter)
async def ...
(func filter is still available until v2.1)
Filters factory
~~~~~~~~~~~~~~~
Also you can bind your own filters for using as keyword arguments:
.. code-block:: python
from aiogram.dispatcher.filters import BoundFilter
class MyFilter(BoundFilter):
key = 'is_admin'
def __init__(self, is_admin):
self.is_admin = is_admin
async def check(self, message: types.Message):
member = await bot.get_chat_member(message.chat.id, message.from_user.id)
return member.is_admin()
dp.filters_factory.bind(MyFilter)
@dp.message_handler(is_admin=True)
async def ...
Customize commands prefix
~~~~~~~~~~~~~~~~~~~~~~~~~
Commands prefix can be changed by following one of two available methods:
.. code-block:: python
@dp.message_handler(commands=['admin'], commands_prefix='!/')
@dp.message_handler(Command('admin', prefixes='!/'))
async def ...
Passing data from filters as keyword arguments to the handlers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can pass any data from any filter to the handler by returning :obj:`dict`
If any key from the received dictionary not in the handler specification the key will be skipped and and will be unavailable from the handler
Before (<=v1.4)
.. code-block:: python
async def my_filter(message: types.Message):
# do something here
message.conf['foo'] = 'foo'
message.conf['bar'] = 42
return True
@dp.message_handler(func=my_filter)
async def my_message_handler(message: types.Message):
bar = message.conf["bar"]
await message.reply(f'bar = {bar}')
Now (v2.0)
.. code-block:: python
async def my_filter(message: types.Message):
# do something here
return {'foo': 'foo', 'bar': 42}
@dp.message_handler(my_filter)
async def my_message_handler(message: types.Message, bar: int):
await message.reply(f'bar = {bar}')
Other
~~~~~
Filters can also be used as logical expressions:
.. code-block:: python
Text(equals='foo') | Text(endswith='Bar') | ~Text(contains='spam')
States group
------------
You can use States objects and States groups instead of string names of the states.
String values is still also be available.
Writing states group:
.. code-block:: python
from aiogram.dispatcher.filters.state import State, StatesGroup
class UserForm(StatesGroup):
name = State() # Will be represented in storage as 'Form:name'
age = State() # Will be represented in storage as 'Form:age'
gender = State() # Will be represented in storage as 'Form:gender'
After that you can use states as `UserForm.name` and etc.
FSM storage's proxy
-------------------
Now `Dispatcher.current_context()` can't be used as context-manager.
Implemented `FSMContext.proxy()` method which returns asynchronous `FSMContextProxy` context manager and can be used for more simply getting data from the storage.
`FSMContextProxy` load all user-related data on initialization and dump it to the storage when proxy is closing if any part of the data was changed.
Usage:
.. code-block:: python
@dp.message_handler(commands=['click'])
async def cmd_start(message: types.Message, state: FSMContext):
async with state.proxy() as proxy: # proxy = FSMContextProxy(state); await proxy.load()
proxy.setdefault('counter', 0)
proxy['counter'] += 1
return await message.reply(f"Counter: {proxy['counter']}")
This method is not recommended in high-load solutions in reason named "race-condition".
File uploading mechanism
------------------------
Fixed uploading files. Removed `BaseBot.send_file` method. This allowed to send the `thumb` field.
Pipe for uploading files from URL
---------------------------------
Known issue when Telegram can not accept sending file as URL. In this case need to download file locally and then send.
In this case now you can send file from URL by using pipe. That means you download and send the file without saving it.
You can open the pipe and use for uploading by calling `types.InputFile.from_file(<URL>)`
Example:
.. code-block:: python
URL = 'https://aiogram.readthedocs.io/en/dev-2.x/_static/logo.png'
@dp.message_handler(commands=['image, img'])
async def cmd_image(message: types.Message):
await bot.send_photo(message.chat.id, types.InputFile.from_url(URL))
I18n Middleware
---------------
You can internalize your bot by following next steps:
(Code snippets in this example related with `examples/i18n_example.py`)
First usage
~~~~~~~~~~~
1. Extract texts
.. code-block:: bash
pybabel extract i18n_example.py -o locales/mybot.pot
2. Create `*.po` files. For e.g. create `en`, `ru`, `uk` locales.
3. Translate texts
4. Compile translations
.. code-block:: bash
pybabel compile -d locales -D mybot
Updating translations
~~~~~~~~~~~~~~~~~~~~~
When you change the code of your bot you need to update `po` & `mo` files:
1. Regenerate pot file:
.. code-block:: bash
pybabel extract i18n_example.py -o locales/mybot.pot
2. Update po files
.. code-block:: bash
pybabel update -d locales -D mybot -i locales/mybot.pot
3. Update your translations
4. Compile `mo` files
.. code-block:: bash
pybabel compile -d locales -D mybot
Error handlers
--------------
Previously errors handlers had to have three arguments `dispatcher`, `update` and `exception` now `dispatcher` argument is removed and will no longer be passed to the error handlers.
Content types
-------------
Content types helper was divided to `types.ContentType` and `types.ContentTypes`.
In filters you can use `types.ContentTypes` but for comparing content types you must use `types.ContentType` class.

View file

@ -1,45 +0,0 @@
===========
Quick start
===========
Simple template
---------------
At first you have to import all necessary modules
.. literalinclude:: ../../examples/echo_bot.py
:language: python
:lines: 6-8
Then you have to initialize bot and dispatcher instances.
Bot token you can get from `@BotFather <https://t.me/BotFather>`_
.. literalinclude:: ../../examples/echo_bot.py
:language: python
:lines: 10-17
Next step: interaction with bots starts with one command. Register your first command handler:
.. literalinclude:: ../../examples/echo_bot.py
:language: python
:lines: 20-25
If you want to handle all messages in the chat simply add handler without filters:
.. literalinclude:: ../../examples/echo_bot.py
:language: python
:lines: 35-37
Last step: run long polling.
.. literalinclude:: ../../examples/echo_bot.py
:language: python
:lines: 40-41
Summary
-------
.. literalinclude:: ../../examples/echo_bot.py
:language: python
:linenos:
:lines: -19,27-

View file

@ -1,25 +0,0 @@
Bot object
==========
Low level API
-------------
Subclass of this class used only for splitting network interface from all of API methods.
.. autoclass:: aiogram.bot.base.BaseBot
:members:
:show-inheritance:
Telegram Bot
------------
This class based on :obj:`aiogram.bot.base.BaseBot`
.. autoclass:: aiogram.bot.bot.Bot
:members:
:show-inheritance:
API Helpers
-----------
.. automodule:: aiogram.bot.api
:members:
:show-inheritance:

View file

@ -1,7 +0,0 @@
Telegram
========
.. toctree::
bot
types/index

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.415416
=========
Animation
=========
.. autoclass:: aiogram.types.animation.Animation
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.405634
=====
Audio
=====
.. autoclass:: aiogram.types.audio.Audio
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.435002
==============
AuthWidgetData
==============
.. autoclass:: aiogram.types.auth_widget_data.AuthWidgetData
:members:
:show-inheritance:

View file

@ -1,19 +0,0 @@
===================
Base TelegramObject
===================
MetaTelegramObject
==================
.. autoclass:: aiogram.types.base.MetaTelegramObject
:members:
:show-inheritance:
TelegramObject
==============
.. autoclass:: aiogram.types.base.TelegramObject
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.401745
============
CallbackGame
============
.. autoclass:: aiogram.types.callback_game.CallbackGame
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.386236
=============
CallbackQuery
=============
.. autoclass:: aiogram.types.callback_query.CallbackQuery
:members:
:show-inheritance:

View file

@ -1,27 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.403478
====
Chat
====
.. autoclass:: aiogram.types.chat.Chat
:members:
:show-inheritance:
ChatType
========
.. autoclass:: aiogram.types.chat.ChatType
:members:
:show-inheritance:
ChatActions
===========
.. autoclass:: aiogram.types.chat.ChatActions
:members:
:show-inheritance:

View file

@ -1,19 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.428185
==========
ChatMember
==========
.. autoclass:: aiogram.types.chat_member.ChatMember
:members:
:show-inheritance:
ChatMemberStatus
================
.. autoclass:: aiogram.types.chat_member.ChatMemberStatus
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.429407
=========
ChatPhoto
=========
.. autoclass:: aiogram.types.chat_photo.ChatPhoto
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.425583
==================
ChosenInlineResult
==================
.. autoclass:: aiogram.types.chosen_inline_result.ChosenInlineResult
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.430090
=======
Contact
=======
.. autoclass:: aiogram.types.contact.Contact
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.404990
========
Document
========
.. autoclass:: aiogram.types.document.Document
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.385369
====================
EncryptedCredentials
====================
.. autoclass:: aiogram.types.encrypted_credentials.EncryptedCredentials
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.397849
========================
EncryptedPassportElement
========================
.. autoclass:: aiogram.types.encrypted_passport_element.EncryptedPassportElement
:members:
:show-inheritance:

View file

@ -1,53 +0,0 @@
======
Fields
======
BaseField
=========
.. autoclass:: aiogram.types.fields.BaseField
:members:
:show-inheritance:
Field
=====
.. autoclass:: aiogram.types.fields.Field
:members:
:show-inheritance:
ListField
=========
.. autoclass:: aiogram.types.fields.ListField
:members:
:show-inheritance:
ListOfLists
===========
.. autoclass:: aiogram.types.fields.ListOfLists
:members:
:show-inheritance:
DateTimeField
=============
.. autoclass:: aiogram.types.fields.DateTimeField
:members:
:show-inheritance:
TextField
=========
.. autoclass:: aiogram.types.fields.TextField
:members:
:show-inheritance:

View file

@ -1,9 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.400380
====
File
====
.. autoclass:: aiogram.types.file.File
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.406260
==========
ForceReply
==========
.. autoclass:: aiogram.types.force_reply.ForceReply
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.399200
====
Game
====
.. autoclass:: aiogram.types.game.Game
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.411808
=============
GameHighScore
=============
.. autoclass:: aiogram.types.game_high_score.GameHighScore
:members:
:show-inheritance:

View file

@ -1,70 +0,0 @@
===================
Telegram data types
===================
Bases
=====
.. toctree::
base
fields
mixins
Types
=====
.. toctree::
sticker_set
encrypted_credentials
callback_query
successful_payment
message_entity
shipping_query
passport_data
inline_keyboard
user
video
encrypted_passport_element
game
file
labeled_price
callback_game
reply_keyboard
chat
document
audio
force_reply
passport_element_error
shipping_address
response_parameters
order_info
game_high_score
sticker
inline_query
location
animation
input_media
inline_query_result
input_file
pre_checkout_query
voice
input_message_content
update
photo_size
venue
chosen_inline_result
video_note
webhook_info
passport_file
chat_member
shipping_option
chat_photo
contact
message
mask_position
user_profile_photos
invoice
auth_widget_data

View file

@ -1,19 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.391643
====================
InlineKeyboardMarkup
====================
.. autoclass:: aiogram.types.inline_keyboard.InlineKeyboardMarkup
:members:
:show-inheritance:
InlineKeyboardButton
====================
.. autoclass:: aiogram.types.inline_keyboard.InlineKeyboardButton
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.413503
===========
InlineQuery
===========
.. autoclass:: aiogram.types.inline_query.InlineQuery
:members:
:show-inheritance:

View file

@ -1,171 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.417480
=================
InlineQueryResult
=================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResult
:members:
:show-inheritance:
InlineQueryResultArticle
========================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultArticle
:members:
:show-inheritance:
InlineQueryResultPhoto
======================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultPhoto
:members:
:show-inheritance:
InlineQueryResultGif
====================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultGif
:members:
:show-inheritance:
InlineQueryResultMpeg4Gif
=========================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultMpeg4Gif
:members:
:show-inheritance:
InlineQueryResultVideo
======================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultVideo
:members:
:show-inheritance:
InlineQueryResultAudio
======================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultAudio
:members:
:show-inheritance:
InlineQueryResultVoice
======================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultVoice
:members:
:show-inheritance:
InlineQueryResultDocument
=========================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultDocument
:members:
:show-inheritance:
InlineQueryResultLocation
=========================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultLocation
:members:
:show-inheritance:
InlineQueryResultVenue
======================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultVenue
:members:
:show-inheritance:
InlineQueryResultContact
========================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultContact
:members:
:show-inheritance:
InlineQueryResultGame
=====================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultGame
:members:
:show-inheritance:
InlineQueryResultCachedPhoto
============================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultCachedPhoto
:members:
:show-inheritance:
InlineQueryResultCachedGif
==========================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultCachedGif
:members:
:show-inheritance:
InlineQueryResultCachedMpeg4Gif
===============================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultCachedMpeg4Gif
:members:
:show-inheritance:
InlineQueryResultCachedSticker
==============================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultCachedSticker
:members:
:show-inheritance:
InlineQueryResultCachedDocument
===============================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultCachedDocument
:members:
:show-inheritance:
InlineQueryResultCachedVideo
============================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultCachedVideo
:members:
:show-inheritance:
InlineQueryResultCachedVoice
============================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultCachedVoice
:members:
:show-inheritance:
InlineQueryResultCachedAudio
============================
.. autoclass:: aiogram.types.inline_query_result.InlineQueryResultCachedAudio
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.419323
=========
InputFile
=========
.. autoclass:: aiogram.types.input_file.InputFile
:members:
:show-inheritance:

View file

@ -1,59 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.416173
==========
InputMedia
==========
.. autoclass:: aiogram.types.input_media.InputMedia
:members:
:show-inheritance:
InputMediaAnimation
===================
.. autoclass:: aiogram.types.input_media.InputMediaAnimation
:members:
:show-inheritance:
InputMediaDocument
==================
.. autoclass:: aiogram.types.input_media.InputMediaDocument
:members:
:show-inheritance:
InputMediaAudio
===============
.. autoclass:: aiogram.types.input_media.InputMediaAudio
:members:
:show-inheritance:
InputMediaPhoto
===============
.. autoclass:: aiogram.types.input_media.InputMediaPhoto
:members:
:show-inheritance:
InputMediaVideo
===============
.. autoclass:: aiogram.types.input_media.InputMediaVideo
:members:
:show-inheritance:
MediaGroup
==========
.. autoclass:: aiogram.types.input_media.MediaGroup
:members:
:show-inheritance:

View file

@ -1,43 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.421648
===================
InputMessageContent
===================
.. autoclass:: aiogram.types.input_message_content.InputMessageContent
:members:
:show-inheritance:
InputContactMessageContent
==========================
.. autoclass:: aiogram.types.input_message_content.InputContactMessageContent
:members:
:show-inheritance:
InputLocationMessageContent
===========================
.. autoclass:: aiogram.types.input_message_content.InputLocationMessageContent
:members:
:show-inheritance:
InputTextMessageContent
=======================
.. autoclass:: aiogram.types.input_message_content.InputTextMessageContent
:members:
:show-inheritance:
InputVenueMessageContent
========================
.. autoclass:: aiogram.types.input_message_content.InputVenueMessageContent
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.434241
=======
Invoice
=======
.. autoclass:: aiogram.types.invoice.Invoice
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.401180
============
LabeledPrice
============
.. autoclass:: aiogram.types.labeled_price.LabeledPrice
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.414572
========
Location
========
.. autoclass:: aiogram.types.location.Location
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.432577
============
MaskPosition
============
.. autoclass:: aiogram.types.mask_position.MaskPosition
:members:
:show-inheritance:

View file

@ -1,35 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.430779
=======
Message
=======
.. autoclass:: aiogram.types.message.Message
:members:
:show-inheritance:
ContentType
===========
.. autoclass:: aiogram.types.message.ContentType
:members:
:show-inheritance:
ContentTypes
============
.. autoclass:: aiogram.types.message.ContentTypes
:members:
:show-inheritance:
ParseMode
=========
.. autoclass:: aiogram.types.message.ParseMode
:members:
:show-inheritance:

View file

@ -1,19 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.388302
=============
MessageEntity
=============
.. autoclass:: aiogram.types.message_entity.MessageEntity
:members:
:show-inheritance:
MessageEntityType
=================
.. autoclass:: aiogram.types.message_entity.MessageEntityType
:members:
:show-inheritance:

View file

@ -1,12 +0,0 @@
======
Mixins
======
Downloadable
============
.. autoclass:: aiogram.types.mixins.Downloadable
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.410818
=========
OrderInfo
=========
.. autoclass:: aiogram.types.order_info.OrderInfo
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.390186
============
PassportData
============
.. autoclass:: aiogram.types.passport_data.PassportData
:members:
:show-inheritance:

View file

@ -1,59 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.406868
====================
PassportElementError
====================
.. autoclass:: aiogram.types.passport_element_error.PassportElementError
:members:
:show-inheritance:
PassportElementErrorDataField
=============================
.. autoclass:: aiogram.types.passport_element_error.PassportElementErrorDataField
:members:
:show-inheritance:
PassportElementErrorFile
========================
.. autoclass:: aiogram.types.passport_element_error.PassportElementErrorFile
:members:
:show-inheritance:
PassportElementErrorFiles
=========================
.. autoclass:: aiogram.types.passport_element_error.PassportElementErrorFiles
:members:
:show-inheritance:
PassportElementErrorFrontSide
=============================
.. autoclass:: aiogram.types.passport_element_error.PassportElementErrorFrontSide
:members:
:show-inheritance:
PassportElementErrorReverseSide
===============================
.. autoclass:: aiogram.types.passport_element_error.PassportElementErrorReverseSide
:members:
:show-inheritance:
PassportElementErrorSelfie
==========================
.. autoclass:: aiogram.types.passport_element_error.PassportElementErrorSelfie
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.427584
============
PassportFile
============
.. autoclass:: aiogram.types.passport_file.PassportFile
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.424408
=========
PhotoSize
=========
.. autoclass:: aiogram.types.photo_size.PhotoSize
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.420010
================
PreCheckoutQuery
================
.. autoclass:: aiogram.types.pre_checkout_query.PreCheckoutQuery
:members:
:show-inheritance:

View file

@ -1,27 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.402352
===================
ReplyKeyboardMarkup
===================
.. autoclass:: aiogram.types.reply_keyboard.ReplyKeyboardMarkup
:members:
:show-inheritance:
KeyboardButton
==============
.. autoclass:: aiogram.types.reply_keyboard.KeyboardButton
:members:
:show-inheritance:
ReplyKeyboardRemove
===================
.. autoclass:: aiogram.types.reply_keyboard.ReplyKeyboardRemove
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.409659
==================
ResponseParameters
==================
.. autoclass:: aiogram.types.response_parameters.ResponseParameters
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.408101
===============
ShippingAddress
===============
.. autoclass:: aiogram.types.shipping_address.ShippingAddress
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.428822
==============
ShippingOption
==============
.. autoclass:: aiogram.types.shipping_option.ShippingOption
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.389286
=============
ShippingQuery
=============
.. autoclass:: aiogram.types.shipping_query.ShippingQuery
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.412723
=======
Sticker
=======
.. autoclass:: aiogram.types.sticker.Sticker
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.383921
==========
StickerSet
==========
.. autoclass:: aiogram.types.sticker_set.StickerSet
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.386887
=================
SuccessfulPayment
=================
.. autoclass:: aiogram.types.successful_payment.SuccessfulPayment
:members:
:show-inheritance:

View file

@ -1,19 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.422384
======
Update
======
.. autoclass:: aiogram.types.update.Update
:members:
:show-inheritance:
AllowedUpdates
==============
.. autoclass:: aiogram.types.update.AllowedUpdates
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.392947
====
User
====
.. autoclass:: aiogram.types.user.User
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.433355
=================
UserProfilePhotos
=================
.. autoclass:: aiogram.types.user_profile_photos.UserProfilePhotos
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.424991
=====
Venue
=====
.. autoclass:: aiogram.types.venue.Venue
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.396006
=====
Video
=====
.. autoclass:: aiogram.types.video.Video
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.426135
=========
VideoNote
=========
.. autoclass:: aiogram.types.video_note.VideoNote
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.420903
=====
Voice
=====
.. autoclass:: aiogram.types.voice.Voice
:members:
:show-inheritance:

View file

@ -1,11 +0,0 @@
.. Autogenerated file at 2018-09-07 21:31:24.426969
===========
WebhookInfo
===========
.. autoclass:: aiogram.types.webhook_info.WebhookInfo
:members:
:show-inheritance:

View file

@ -1,6 +0,0 @@
===========
Auth Widget
===========
.. automodule:: aiogram.utils.auth_widget
:members:

View file

@ -1,6 +0,0 @@
==========
Deprecated
==========
.. automodule:: aiogram.utils.deprecated
:members:

View file

@ -1,6 +0,0 @@
=====
Emoji
=====
.. automodule:: aiogram.utils.emoji
:members:

View file

@ -1,6 +0,0 @@
==========
Exceptions
==========
.. automodule:: aiogram.utils.exceptions
:members:

View file

@ -1,7 +0,0 @@
========
Executor
========
.. automodule:: aiogram.utils.executor
:members:

View file

@ -1,6 +0,0 @@
======
Helper
======
.. automodule:: aiogram.utils.helper
:members:

View file

@ -1,15 +0,0 @@
Utils
=====
.. toctree::
auth_widget
executor
exceptions
markdown
helper
deprecated
payload
parts
json
emoji

View file

@ -1,6 +0,0 @@
====
JSON
====
.. automodule:: aiogram.utils.json
:members:

View file

@ -1,6 +0,0 @@
========
Markdown
========
.. automodule:: aiogram.utils.markdown
:members:

View file

@ -1,6 +0,0 @@
=====
Parts
=====
.. automodule:: aiogram.utils.parts
:members:

View file

@ -1,6 +0,0 @@
=======
Payload
=======
.. automodule:: aiogram.utils.payload
:members: