Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
.. image:: https://img.shields.io/badge/license-BSD-blue.svg :target: https://github.com/KonstantinTogoi/aiomailru/blob/master/LICENSE
.. image:: https://img.shields.io/pypi/v/aiomailru.svg :target: https://pypi.python.org/pypi/aiomailru
.. image:: https://img.shields.io/pypi/pyversions/aiomailru.svg :target: https://pypi.python.org/pypi/aiomailru
.. image:: https://readthedocs.org/projects/aiomailru/badge/?version=latest :target: https://aiomailru.readthedocs.io/en/latest/
.. image:: https://travis-ci.org/KonstantinTogoi/aiomailru.svg :target: https://travis-ci.org/KonstantinTogoi/aiomailru
.. index-start-marker1
aiomailru is a python Mail.Ru API <https://api.mail.ru/>
_ wrapper.
The main features are:
Authorization Code <https://oauth.net/2/grant-types/authorization-code/>
, Implicit Flow <https://oauth.net/2/grant-types/implicit/>
, Password Grant <https://oauth.net/2/grant-types/password/>
, Refresh Token <https://oauth.net/2/grant-types/refresh-token/>
)REST API <https://api.mail.ru/docs/reference/rest/>
_ methodsTo use Mail.Ru API <https://api.mail.ru/>
_ you need a registered app and
Mail.Ru <https://mail.ru>
_ account.
For more details, see
aiomailru Documentation <https://aiomailru.readthedocs.io/>
_.
Client application
Use :code:`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.
.. code-block:: python
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 :code:`access_token` and :code:`uid`
that were received after authorization. For more details, see
`authorization instruction <https://aiomailru.readthedocs.io/en/latest/authorization.html>`_.
Server application
Use :code:ServerSession
when REST API is needed in:
.. code-block:: python
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 :code:access_token
that was received after authorization.
For more details, see
authorization instruction <https://aiomailru.readthedocs.io/en/latest/authorization.html>
_.
.. code-block:: shell
$ pip install aiomailru
or
.. code-block:: shell
$ python setup.py install
Python 3.5, 3.6, 3.7 and 3.8 are supported.
.. index-end-marker1
Run all tests.
.. code-block:: shell
$ python setup.py test
Run tests with PyTest.
.. code-block:: shell
$ python -m pytest [-k TEST_NAME]
aiomailru is released under the BSD 2-Clause License.
FAQs
Python Mail.Ru API wrapper
We found that aiomailru demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.