Skip to main content

Platform@Mail.ru Python REST API wrapper

Project description

https://img.shields.io/badge/license-BSD-blue.svg https://img.shields.io/pypi/v/aiomailru.svg https://img.shields.io/pypi/pyversions/aiomailru.svg https://img.shields.io/badge/docs-latest-brightgreen.svg https://travis-ci.org/KonstantinTogoi/aiomailru.svg

aiomailru

aiomailru is a my.mail.ru python API wrapper. The main features are:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiomailru-0.1.0.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

aiomailru-0.1.0-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file aiomailru-0.1.0.tar.gz.

File metadata

  • Download URL: aiomailru-0.1.0.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

Hashes for aiomailru-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6dade070dab1c84366ba98715c6028933bd2012507fe20aec480c958ddba0eaf
MD5 cfd94404be4bf005ca8fb1a57659003a
BLAKE2b-256 998ad314937a60d6cabe959c501464bf4a96ee40da37273fcf6681779ab6939c

See more details on using hashes here.

File details

Details for the file aiomailru-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aiomailru-0.1.0-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

Hashes for aiomailru-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c0a391e261257139578d7072c9675cf691314b3d818c6ed6257d88d8b4567ac
MD5 16221885564fa4b76d600e977a353f06
BLAKE2b-256 3a2b916f817831f143e5d705fbc5aecfb4b1349bbf283599c62fa69f41efe9eb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page