Skip to main content

VKFlow

VKFlow

Современный асинхронный фреймворк для создания ботов ВКонтакте

PyPI Python License Docs VK


Установка

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.

Лицензия

MIT

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)

Source distribution for vkflow 1.2.0
File Size Uploaded
vkflow-1.2.0.tar.gz 174.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vkflow 1.2.0
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page