Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Library for interaction with API of vk with decorators support

Project Description

The interface is like the interface of library “vk”:

>>>import vkAPI

>>>session = vkAPI.Session('<access_token>'[, '<secret>'])

>>>api = vkAPI(session[, v='5.68'][, ...])

>>>api.messages.send(user_id=<user_id>, message='<message>')

It has a newer method to auth with login and password(it works much faster than at the “vk”):

>>>import vkAPI

>>>session = AuthSession('<user_login>', 'user_password'[, app_id=<app_id>][, scope='all'][, lang='ru'][, client_secret='<secret>'])

It has a class of decorator:

>>>import vkAPI

>>> session = ...

>>>decorator = vkAPI.Decorator(session)

...def callback(callback_data):
...    print(callback_data)
>>>class Test:
...    @decorator.users.get(user_ids='...')
...    def callback(self, callback_data):
...        print(callback_data)


The callback data must be at the end of users function/method

It also has a LongPoll support:

>>>import vkAPI

>>>longpoll = LongPoll(<access_token>[, using='multiprocessing']) # You can also use threading



>>>for num, update in longpoll.iter_updates():
...    if num == 10:
...        break
...    print(update)

>>>with LongPoll('access_token', 'multiprocessing') as longpoll:
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
vkAPI-1.3.0.tar.gz (5.6 kB) Copy SHA256 Checksum SHA256 Source Aug 30, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting