vk.com 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 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=Авторизация)
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
vk-0.0.1.tar.gz
(6.5 kB
view details)
File details
Details for the file vk-0.0.1.tar.gz.
File metadata
- Download URL: vk-0.0.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
665e4ad853ac68cba35ceb97e43f20a58880e65bd833edcbfe27ce95e1b1be94
|
|
| MD5 |
211c38a144eb3606bd6e0fb0fdadd4db
|
|
| BLAKE2b-256 |
940e92870f837908f7821572db4abeafe712d2ca3b012d8c5fee6f75402cb899
|