Skip to main content
https://img.shields.io/badge/license-BSD-blue.svg https://img.shields.io/pypi/v/aiookru.svg https://img.shields.io/pypi/pyversions/aiookru.svg https://readthedocs.org/projects/aiookru/badge/?version=latest https://github.com/konstantintogoi/aiookru/actions/workflows/pages/pages-build-deployment/badge.svg

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.

Metadata

Release files for aiookru 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiookru 1.0.0
File Size Uploaded
aiookru-1.0.0.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiookru 1.0.0
File Interpreter ABI Platform
aiookru-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / aiookru-1.0.0.tar.gz

Download URL aiookru-1.0.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4170b8b4184815de9136daf0425265797633b4d8ea1552422d05c9c86d8f1ca8
BLAKE2b-256 checksum
How to use checksums
ba7929bf0912af158f2762a7fb03673a97ffcf41a71d4470e8c71f3188f05590
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.12

Release files / aiookru-1.0.0-py3-none-any.whl

Download URL aiookru-1.0.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f751602f050dfc5133baf964193856e02dcdf59a4c9f19a8fafc7dc87fbda2fe
BLAKE2b-256 checksum
How to use checksums
7b1f187cf6f011a98a8192e2ef6cbc4e2bcaa93850494daa3e5f4d1596a1a6ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.12

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page