You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vkbee

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vkbee

Simple async VK library faster than vk_api

4.1
pipPyPI
Maintainers
1

vkbee

VKBee - простая в использовании библиотека для взаимодействия с API ВКонтакте

Made with Python Downloads License

Установка

Из 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

Keywords

vk api framework python

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts