Фреймворк на Python для VK API
Project description
Фреймворк для VK API.
С помощью этого фреймворка можно написать бота для группы ВКонтакте. Фреймворк был сделан недавно, документация появится чуть позже.
Фреймворк устанавливается с помощью команды
pip install vk_air
или
pip install git+https://github.com/sultan1k/vk_air
Пару примеров с кодом:
from vk_air import Client
from vk_air.utils import Utils
bot = Client(prefix='!', debug=False)
@bot.command(name='hi')
async def hi(ctx):
await ctx.send('Привет')
@bot.event(name='chat_invite_user')
async def add_me(ctx):
if ctx.action.member_id == -bot.group.id:
await ctx.send('Вы добавили меня в беседу!')
@bot.command(name='whois')
async def whois(ctx, user, *, reason):
user = Utils().mention_to_id(user) # достаём из упоминания айди
await ctx.send(f'Айди пользователя - {user}\nПричина вызова команды: {reason}')
bot.login(token='TOKEN')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vk_air-0.5.17.tar.gz
(41.9 kB
view details)
File details
Details for the file vk_air-0.5.17.tar.gz.
File metadata
- Download URL: vk_air-0.5.17.tar.gz
- Upload date:
- Size: 41.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0798c8fe2c6ea5905f5702a4ab7ee774a037b4f966c60aeea28d0540b02f1be3
|
|
| MD5 |
e6b1703aad572b8a372f8a8a687f40e1
|
|
| BLAKE2b-256 |
e92fc3ab4e80fc7b0a9dc801d941042dd1b5a7d278ca4c55c932bd525b4da537
|