Skip to main content

API Wrapper for osu!api v2 written in Python.

Project description

osu.py

Discord server invite PyPI version info Download metric Documentation

Easy to use API wrapper for osu!api v2 written in Python. Has a high-level interface while still allowing ways to do more complex things.

Major features/capabilties

  • Client class which carries out all api requests.

  • AsynchronousClient class which is the same as Client but all api request functions are asynchronous.

  • NotificationWebsocket class for using the notification websocket feature of osu api v2.

  • Support for Authorization Code Grant and Client Credentials Grant.

  • Builtin rate limit handling

  • Storage efficient objects used to contain almost all the data returned from osu.py for any given api request.

  • Refresh and access token is automatically managed.

  • Utility functions and classes that make your life easier.

  • Documentation that covers everything osu.py is capable of.

Installation

# Installs the latest version out on pypi

# Linux/macOS
python3 -m pip install -U osu.py

# Windows
py -3 -m pip install -U osu.py

# Installing straight from github (downloads latest code, which is not guaranteed to be stable)
[python prefix used above] -m pip install git+https://github.com/Sheepposu/osu.py.git

    # Install with features
    [python prefix] -m pip install -U osu.py[replay,notifications]

    # Install from github with features
    git clone https://github.com/sheppsu/osu.py
    cd osu.py
    [python prefix] -m pip install -U .[replay,notifications]

Example

from osu import Client, GameModeStr

client = Client.from_client_credentials(0, "*****", None)
user = client.get_user(14895608, GameModeStr.STANDARD)
print(user)

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

osu_py-2.0.2.tar.gz (78.4 kB view hashes)

Uploaded Source

Built Distribution

osu.py-2.0.2-py3-none-any.whl (89.7 kB view hashes)

Uploaded Python 3

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