async python ok.ru API wrapper for REST API methods.
To use ok.ru API you need a registered app and ok.ru account.
Use ClientSession
for:
- 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.
import aiookru
session = ClientSession(client_id, application_key, access_token, session_secret_key)
api = API(session)
friends = await api.friends.get()
events = await api.events.get()
Pass session_secret_key
and access_token
that were received after authorization.
For more details, see authorization instruction.
Use ServerSession
for:
- server component of the client-server application
- requests from your servers
import aiookru
session = ServerSession(client_id, application_key, application_secret_key, access_token)
api = API(session)
friends = await api.friends.get()
events = await api.events.get()
Pass application_secret_key
and access_token
that was received after authorization.
For more details, see authorization instruction.
$ pip install aiookru
Python 3.7, 3.8, 3.9 are supported.
aiookru is released under the BSD 2-Clause License.