Skip to main content

Package for creating VK bots

Project description

vk_dev

PyPI version Downloads

Localizations:

Info

What true convenience is?

You have a lot of doorways to try amazing python package for developing with API VKontakte. By using the flavor of python this library let you write on readable style without complications when need write fast or when you are at 0 days and refactor your project conveniencly and with idea.

Installation

pip3 install vk_dev

Example

import vk_dev

api = vk_dev.Api(
    token='token',
    group_id=192979547,
    v=5.103
)
lp = api >> vk_dev.LongPoll()

## You can create own decorators
@vk_dev.cond.Path('direct')
@vk_dev.cond.Prefix('/', '.')
@lp.message_new()
async def reaction(event, pl):
    """
    This function will work if
    message was sended to direct and
    starts at `/` or `.`
    """

    ## Send response to the interlocutor
    await api.messages.send(
        peer_id=event.object.message.peer_id,
        message='Hello there',
        random_id=vk_dev.random_id()
    )

if __name__ == '__main__':
    lp()

Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vk_dev-3.0.1.tar.gz (9.9 kB view hashes)

Uploaded Source

Built Distribution

vk_dev-3.0.1-py3-none-any.whl (16.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page