Simple async VK library faster than vk_api
Project description
VKBee - простая в использовании библиотека для взаимодействия с API ВКонтакте
Установка
Из PyPI:
$ pip install vkbee
Из GitHub (рекомендуется):
$ pip install https://github.com/vkbee/vkbee/archive/master.zip
Минимальная версия Python - 3.6
Пример использования
import asyncio
import vkbee
from vkbee.longpoll import BotLongpoll, Session
from vkbee import API
async def main(loop):
vk_session = Session(token='token', loop=loop)
longpoll = BotLongpoll(vk_session, 'groupid', 10)
async for event in longpoll.events():
user_id = event['object']['message']['from_id']
message_text = event['object']['message']['text']
await API.call(vk_session, 'messages.send', {'user_id': user_id, 'message': message_text, 'random_id': 0})
loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))
Более расширенное использование описано в документации
Сообщество
Soon
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
vkbee-4.1.tar.gz
(4.6 kB
view details)
Built Distribution
vkbee-4.1-py3-none-any.whl
(10.5 kB
view details)
File details
Details for the file vkbee-4.1.tar.gz
.
File metadata
- Download URL: vkbee-4.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 749ce49c8705be00368cad85a184757373fcf13bf18a93760d30ec0cd64f6dcc |
|
MD5 | fe21485ebece2c7be6c5dc170bf482b6 |
|
BLAKE2b-256 | 0f547b2d103637993abccd562fda33bf981397c4d0b56f7da18a9e6e62a5964c |
File details
Details for the file vkbee-4.1-py3-none-any.whl
.
File metadata
- Download URL: vkbee-4.1-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1ad65eead20660f27281ca958358664b80ba82b3391ed2befef57d79a1bb95d |
|
MD5 | 4030c039a6a1a8004a26608bf84120ee |
|
BLAKE2b-256 | bf072f6e552ebb0a0523d8e58887cca3f1d59d6a6e7dba85a10b40a4a02684fc |