Git Product home page Git Product logo

aiookru's Introduction

image

image

image

image

image

aiookru

aiookru is a python ok.ru API wrapper. The main features are:

Usage

To use ok.ru API you need a registered app and ok.ru account. For more details, see aiookru Documentation.

Client application

Use ClientSession when REST API is needed in:

  • client component of the client-server application
  • standalone mobile/desktop application

i.e. when you embed your app's info (application key) in publicly available code.

from aiookru import ClientSession, API

session = ClientSession(app_id, app_key, access_token, session_secret_key)
api = API(session)

events = await api.events.get()
friends = await api.friends.get()

Pass session_secret_key and access_token that were received after authorization. For more details, see authorization instruction.

Server application

Use ServerSession when REST API is needed in:

  • server component of the client-server application
  • requests from your servers
from aiookru import ServerSession, API

session = ServerSession(app_id, app_key, app_secret_key, access_token)
api = API(session)

events = await api.events.get()
friends = await api.friends.get()

Pass app_secret_key and access_token that was received after authorization. For more details, see authorization instruction.

Installation

pip install aiookru

or

python setup.py install

Supported Python Versions

Python 3.5, 3.6, 3.7 and 3.8 are supported.

Test

Run all tests.

python setup.py test

Run tests with PyTest.

python -m pytest [-k TEST_NAME]

License

aiookru is released under the BSD 2-Clause License.

aiookru's People

Contributors

konstantintogoi avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.