aiomailru is a python Mail.Ru API wrapper. The main features are:
To use Mail.Ru API you need a registered app and Mail.Ru account. For more details, see aiomailru Documentation.
Use ClientSession
when REST API is needed in:
- a client component of the client-server application
- a standalone mobile/desktop application
i.e. when you embed your app's info (private key) in publicly available code.
from aiomailru import ClientSession, API
session = ClientSession(app_id, private_key, access_token, uid)
api = API(session)
events = await api.stream.get()
friends = await api.friends.getOnline()
Use access_token
and uid
that were received after authorization. For more details, see
authorization instruction.
Use ServerSession
when REST API is needed in:
- a server component of the client-server application
- requests from your servers
from aiomailru import ServerSession, API
session = ServerSession(app_id, secret_key, access_token)
api = API(session)
events = await api.stream.get()
friends = await api.friends.getOnline()
Use access_token
that was received after authorization.
For more details, see
authorization instruction.
$ pip install aiomailru
Python 3.7, 3.8, 3.9 are supported.
aiomailru is released under the BSD 2-Clause License.