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.
Usage
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 = vk.photos.getAlbums(owner_id=329237321)
>>> {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.
Credits
Some ideas (such as first-class queryset-like methods) are inspired by vk-requests.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.