vkontakte /

Filename Size Date modified Message
vkontakte
225 B
trying to fix coverage stats; add py26 and pypy to travis config
49 B
travis, coveralls integration
216 B
bugfix for breaking vk.com changes (see #3, #4)
332 B
Added tag v1.3.2 for changeset f9988198da29
514 B
install simplejson for py26/travis
236 B
remove back compatibility from constructor; using propery-decorator; increased version
1.2 KB
bugfix for breaking vk.com changes (see #3, #4)
1.1 KB
Changes from python_vkontakte_api fork: OAuth2 support, api.ads.* support; vkontakte.api.request is deprecated. Thanks ramsus.
56 B
Initial import
1.6 KB
set exact version of mock, added coveralls image
982 B
bump version
221 B
bugfix for breaking vk.com changes (see #3, #4)

vkontakte

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=Авторизация)

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.