osu! api wrapper.
Project description
======
|pip| |Documentation Status|
Welcome to osssss!
osuapi a python wrapper for the osu! api.
It's "agnostic" of the requesting backend. Uses "connectors" to handle
making requests and retrieving json. Comes with ``aiohttp`` and
``requests`` implementations.
Using with aiohttp
.. code:: py
from osuapi import OsuApi, AHConnector
import aiohttp
import asyncio
async def get_peppy_user_id():
api = OsuApi("mykey", connector=AHConnector())
results = await api.get_user("peppy")
return results[0].user_id
results = asyncio.get_event_loop().run_until_complete(get_peppy_user_id())
Or requests
.. code:: py
from osuapi import OsuApi, ReqConnector
import requests
api = OsuApi("mykey", connector=ReqConnector())
results = api.get_user("peppy")
.. |pip| image:: https://img.shields.io/pypi/v/osuapi.svg
:target: https://pypi.python.org/pypi/osuapi/
.. |Documentation Status| image:: http://readthedocs.org/projects/osuapi/badge/?version=latest
:target: http://osuapi.readthedocs.io/en/latest/?badge=latest
Keywords: osu
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Utilities
|pip| |Documentation Status|
Welcome to osssss!
osuapi a python wrapper for the osu! api.
It's "agnostic" of the requesting backend. Uses "connectors" to handle
making requests and retrieving json. Comes with ``aiohttp`` and
``requests`` implementations.
Using with aiohttp
.. code:: py
from osuapi import OsuApi, AHConnector
import aiohttp
import asyncio
async def get_peppy_user_id():
api = OsuApi("mykey", connector=AHConnector())
results = await api.get_user("peppy")
return results[0].user_id
results = asyncio.get_event_loop().run_until_complete(get_peppy_user_id())
Or requests
.. code:: py
from osuapi import OsuApi, ReqConnector
import requests
api = OsuApi("mykey", connector=ReqConnector())
results = api.get_user("peppy")
.. |pip| image:: https://img.shields.io/pypi/v/osuapi.svg
:target: https://pypi.python.org/pypi/osuapi/
.. |Documentation Status| image:: http://readthedocs.org/projects/osuapi/badge/?version=latest
:target: http://osuapi.readthedocs.io/en/latest/?badge=latest
Keywords: osu
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Utilities
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
osuapi-0.0.33.tar.gz
(10.5 kB
view hashes)