VKFlow
Современный асинхронный фреймворк для создания ботов ВКонтакте
Установка
pip install vkflow
С дополнениями для производительности:
pip install vkflow[speed]
Быстрый старт
import vkflow as vf
app = vf.App()
@app.command("ping")
async def ping():
return "Pong!"
@app.command("дата")
async def reg_date(user: vf.User):
date = await vf.get_user_registration_date(user.id)
return f"{user:@[first_name]} зарегистрирован {date:%d.%m.%Y}"
app.run("YOUR_TOKEN")
Возможности
|
Type hints как аргументы - параметры команд парсятся из аннотаций типов |
Интерактивный UI - клавиатуры, карусели, View с callback-кнопками |
|
FSM - конечные автоматы для многошаговых диалогов |
Cog-система - группировка команд в модули |
|
Проверки и cooldown - декораторы для контроля доступа |
Webhook и LongPoll - оба режима из коробки |
|
Система аддонов - расширение функциональности через плагины | |
Интерактивные View
class ConfirmView(vf.ui.View):
def __init__(self):
super().__init__(timeout = 60, inline = True)
self.result = None
@vf.ui.button(label = "Да", color = "positive")
async def yes(self, interaction: vf.Callback):
self.result = True
await interaction.answer("Принято!")
self.stop()
@vf.ui.button(label = "Нет", color = "negative")
async def no(self, interaction: vf.Callback):
self.result = False
await interaction.answer("Отменено")
self.stop()
Cog-модули
class Admin(vf.Cog):
@vf.command("бан")
@vf.check(...)
async def ban(self, ctx: vf.Context, user: vf.User):
...
await ctx.reply(f"{user:@[first_name]} забанен")
Требования
- Python 3.11+
- VK API 5.199
Credits
Based on vkquick.
Лицензия
Metadata
Release files for vkflow 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vkflow-1.2.0.tar.gz | 174.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vkflow-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 392.9 kB
Release files / vkflow-1.2.0.tar.gz
| Download URL | vkflow-1.2.0.tar.gz |
|---|---|
| Size | 174.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66acef0fdf4d7105c882db251e1624bcf18373cf7d86c066e4f4d60ebd16577d
|
|
BLAKE2b-256 checksum How to use checksums |
292b82289821b82597f8c38d16f0382c135e770bfb74dbb52246420fcdc2f362
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 13, 2026.
Transparency logRelease files / vkflow-1.2.0-py3-none-any.whl
| Download URL | vkflow-1.2.0-py3-none-any.whl |
|---|---|
| Size | 218.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
afe67a315c1a279248f1097e978883edee03aafd50bdd3d8b230b79823e958a8
|
|
BLAKE2b-256 checksum How to use checksums |
4b0f855d6027001f52f843f9c074df92afbbaa0290948bb31d1c2b5ddfcf8fea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 13, 2026.
Transparency log