Python ok.ru API wrapper
Project description
aiookru
async python ok.ru API wrapper for REST API methods.
Usage
To use ok.ru API you need a registered app and an access_token
.
import aiookru
client_id = '12345678'
application_key = 'ABCDEFGHIJKLMNOPQ'
application_secret_key = '0A1B2C3D4E5F6G7H8I9K10L11M12N13O14P15Q'
redirect_uri = 'http://apiok.ru/oauth_callback'
code = '' # get code from login form
async with aiookru.CodeGrant(client_id, application_secret_key, redirect_uri, code) as grant:
access_token = grant.access_token
refresh_token = grant.refresh_token
async with aiookru.API(access_token, application_key, application_secret_key=application_secret_key) as okru:
events = await okru.events.get()
async with aiookru.RefreshGrant(client_id, application_secret_key, refresh_token) as grant:
access_token = grant.access_token
For more details, see authorization instruction.
Installation
$ pip install aiookru
Supported Python Versions
Python 3.7, 3.8, 3.9 are supported.
License
aiookru is released under the BSD 2-Clause License.
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
aiookru-1.0.0.tar.gz
(6.2 kB
view details)
Built Distribution
File details
Details for the file aiookru-1.0.0.tar.gz
.
File metadata
- Download URL: aiookru-1.0.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4170b8b4184815de9136daf0425265797633b4d8ea1552422d05c9c86d8f1ca8
|
|
MD5 |
54e848839593d031025d1558fb0a0417
|
|
BLAKE2b-256 |
ba7929bf0912af158f2762a7fb03673a97ffcf41a71d4470e8c71f3188f05590
|
File details
Details for the file aiookru-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: aiookru-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
f751602f050dfc5133baf964193856e02dcdf59a4c9f19a8fafc7dc87fbda2fe
|
|
MD5 |
3a6289838c41d4291a41757f2f2127d7
|
|
BLAKE2b-256 |
7b1f187cf6f011a98a8192e2ef6cbc4e2bcaa93850494daa3e5f4d1596a1a6ab
|