Platform@Mail.ru Python REST API wrapper
Project description
aiomailru
aiomailru is a my.mail.ru python API wrapper. The main features are:
authorization (Authorization Code, Implicit Flow, Password Grant, Refresh Token)
REST API methods
web scrapers
Usage
To use Platform@Mail.Ru API you need a registered app and Mail.Ru account. For more details, see aiomailru Documentation.
Client application
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()
Pass access_token
and uid
that were received after authorization. For more details, see
aiomailru Documentation.
Server application
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()
Pass access_token
that was received after authorization.
For more details, see
aiomailru Documentation.
Installation
$ pip install aiomailru
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
aiomailru 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
Built Distribution
File details
Details for the file aiomailru-0.1.0rc1.tar.gz
.
File metadata
- Download URL: aiomailru-0.1.0rc1.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.5.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4c78c94dcd00d57595449cb579dcc6a5f8e0a7916190f3e089edca2d9ad7c8c |
|
MD5 | bfab06b746cdfe8ddc1118ad1bbc6c5b |
|
BLAKE2b-256 | ccdcb13d0768273746059d45e53905d5dd2bcb258ceb69a362fc79b0524494e5 |
File details
Details for the file aiomailru-0.1.0rc1-py3-none-any.whl
.
File metadata
- Download URL: aiomailru-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.5.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba8a14b6ecd7b2a4df0d2c58279702173f0ae36474bdd3e6a9c0b61e33fe6b79 |
|
MD5 | c3d092ac417631d0650455abea2dbadd |
|
BLAKE2b-256 | d29eb6d78ef5565b0d113d6a4594a1c5605b8da974862e213b49dc71c87d8e74 |