Skip to main content
https://travis-ci.org/kmike/vkontakte.png?branch=master https://coveralls.io/repos/kmike/vkontakte/badge.png?branch=master

This is a vk.com (aka vkontakte.ru, largest Russian social network) python API wrapper. The goal is to support all API methods (current and future) that can be accessed from server.

Installation

$ pip install vkontakte

Usage

>>> import vkontakte
>>> vk = vkontakte.API('my_api_id', 'my_api_secret')
>>> print vk.getServerTime()
1282689362

>>> vk = vkontakte.API(token='my_access_token')
>>> print vk.getServerTime()
1282689362

>>> profiles = vk.getProfiles(uids='1,2', fields='education')
>>> pavel = profiles[0]
>>> print pavel['last_name'], pavel['university_name']
Дуров СПбГУ

>>> # alternative syntax
>>> profiles = vk.get('getProfiles', uids='1,2', fields='education')
>>> pavel = profiles[0]
>>> print pavel['last_name'], pavel['university_name']
Дуров СПбГУ

>>> # custom timeout example (default timeout = 1s)
>>> vk = vkontakte.API('my_api_id', 'my_api_secret', timeout=5)
>>> print vk.getServerTime()
1282689362

>>> # syntax sugar for 'secure.*' methods
>>> print vk.secure.getSMSHistory()
None

All API methods that can be called from server should be supported.

See http://bit.ly/9Nzc8h for detailed API help.

OAuth2 access_token is supported (docs are here http://vkontakte.ru/developers.php?oid=-1&p=Авторизация)

Changes

dev (TBA)

  • bugfix for breaking vkontakte API updates.

simplejson is now required under python 2.6 (it was previously required only under python 2.5).

1.3.2 (2012-05-19)

  • more COMPLEX_METHODS are suported.

1.3.1 (2012-04-09)

  • don’t raise an exception on json with control characters from vkontakte;

  • properly encode request parameters after dumping them to json format.

1.3 (2012-03-27)

  • dict, list and tuple arguments are now properly serialized;

  • more info is preserved in VKError.

1.2.1 (2012-02-15)

  • properly encode unicode for API calls;

  • tox test running.

1.2 (2012-01-20)

  • ‘get’ API calls are fixed;

  • tests are added.

1.1.0 (2012-01-11)

  • more magic methods are supported;

  • proper timestamp calculation.

1.0.0 (2011-12-29)

  • OAuth2 support;

  • api.ads support;

0.9.5 (2010-10-30)

  • syntax sugar for ‘secure’ methods;

  • make vkontakte.signature public;

  • unicode param names are fixed;

0.9.3 (2010-09-02)

  • timeout support

0.9.1 (2010-08-25)

Initial release.

Release files for vkontakte 1.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vkontakte 1.3.3
File Size Uploaded
vkontakte-1.3.3.tar.gz 11.6 kB Details

Release files / vkontakte-1.3.3.tar.gz

Download URL vkontakte-1.3.3.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3644e5f03f04f314787f4c58899c8029d4f10e8f68f5d563a0f7548179b9668d
BLAKE2b-256 checksum
How to use checksums
2e44b7cf427cc9efcde9c66ef3216f60bc1ce1d6ba66a21e8888a892176fe0b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.3.5

1 release file

1.3.4

1 release file

This release

1.3.3 This release

1 release file

1.3.2

1 release file

1.3.1

1 release file

1.3

1 release file

1.2.1

1 release file

1.2

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.9.5

1 release file

0.9.3

1 release file

0.9.2

1 release file

0.9.1

1 release file

0.9

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page