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!

VK API for Python

Project Description

PyVK implements a Python client for VK (major Russian social network.) It is

  • cross-platform: Supports both Python 2 and 3.
  • user-friendly: Robust authorisation. Error handling.
  • smart: Renews expired authorisation. Repeats failed requests. Delays too frequent requests.
  • configurable: Exposes parameters of HTTP requests, logging, user input, API version, error handling, and so on.



>>> from pyvk import API
>>> vk = API(api_id=<...>, username=<...>)
Password: <...>

Password is requested only for the first time: PyVK stores API token on disk and renews it automatically. Secret code, mobile phone, and captcha may also be requested during the initial authorisation.

One can also directly specify an API token obtained elsewhere:

>>> vk = API(token=<...>)

Method Calls

>>> vk.users.get(user_ids=['haroldpain'], fields=['home_town'])
[{'last_name': 'Arató', 'home_town': 'Kőszeg', 'first_name': 'András', 'id': 329237321}]

>>> albums =
>>> {a['title'] for a in albums['items']}
{'Zuglói képek', 'In the arboretum of the Horticulture University in Budapest'}

See list of methods at VK developers section. Note that pythonic integers and lists can be used where the official API documentation specify numbers (including negative) and comma-separated lists.


Some ideas (such as first-class queryset-like methods) are inspired by vk-requests.

Release History

Release History

This version
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
pyvk-0.0.1-py2.py3-none-any.whl (10.2 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Sep 5, 2016
pyvk-0.0.1.tar.gz (7.7 kB) Copy SHA256 Checksum SHA256 Source Sep 5, 2016

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