This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This library consists of an API interface for Odnoklassniki and Django middleware which helps to configure it.

Usage example:

import pyodnoklassniki

pyodnoklassniki.app_pub_key = 'CBAJ...BABA'
pyodnoklassniki.app_secret_key = '123...XYZ'

ok_api = pyodnoklassniki.OdnoklassnikiAPI(
    access_token='kjdhfldjfhgldsjhfglkdjfg9ds8fg0sdf8gsd8fg')

try:
    print ok_api.users.getCurrentUser()
except pyodnoklassniki.OdnoklassnikiError as exc:
    print exc

You might find that configuring library with Django Middleware is more convenient.

MIDDLEWARE_CLASSES = (
    # ...
    'pyodnoklassniki.contrib.django.middleware.PyOdnoklassnikiMiddleware',
    # ...
)

PYODNOKLASSNIKI = {
    'app_pub_key': 'CBAJ...BABA',
    'app_secret_key': '123...XYZ',
}

Use dotted notation to invoke API method. Query parameters are passed as keyword arguments. Odnoklassniki error codes are grouped by meaning in exceptions.py, but OdnoklassnikiError might be enough. See full list of API methods and error codes at Odnoklassniki API documentation.

try:
    response = ok_api.group.getUserGroupsV2()
except pyodnoklassniki.OdnoklassnikiError as exc:
    print exc
else:
    for group in response['groups']:
        print ok_api.group.getInfo(uids=group['groupId'],
                                   fields='name, description')

You can process particular error code such as PARAM_SESSION_EXPIRED as well.

from pyodnoklassniki import errors

try:
    response = ok_api.users.getCurrentUser()
except pyodnoklassniki.AuthError as exc:
    if exc.code == errors.PARAM_SESSION_EXPIRED:
        # Renew session...
        pass
Release History

Release History

0.12

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.11

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyodnoklassniki-0.12.tar.gz (4.8 kB) Copy SHA256 Checksum SHA256 Source Sep 18, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting