vk.com (vkontakte.ru) API wrapper
Project description
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 vkontakte2
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vkontakte2-1.3.4.tar.gz.
File metadata
- Download URL: vkontakte2-1.3.4.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a16b023fbe6c72e8b04bf7eb40d2565efc271f879eb85ab62ecc32251189fec0
|
|
| MD5 |
78c96832f874572f09386a9abe769ffb
|
|
| BLAKE2b-256 |
e8e6e6f7788cfd6529017b07ffb7c7a8346463c06e5afdf23c270fe4ecb6fc1d
|
File details
Details for the file vkontakte2-1.3.4.macosx-10.6-intel.exe.
File metadata
- Download URL: vkontakte2-1.3.4.macosx-10.6-intel.exe
- Upload date:
- Size: 75.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd7430a7cecb8144a8210d9c1f7930e539b040a384182dfc52df9ec887d6543c
|
|
| MD5 |
957094db2e05cf1e4f1ea7cec280310b
|
|
| BLAKE2b-256 |
131293b1e93523e134d12751bb7546d3660febd2f8d1529e5b4296e30c6519fb
|