Skip to main content

Python wrapper for the Osu apiv2.

Project description

Losuapi

Python wrapper for the Osu apiV2

Important

Development in progress


Setup

  • Register an Oauth application on the osu account settings page.
    • Do not set an Application callback URL, the current version of this package does not need one.

creating client_id and client_secret variables example

CLIENT_ID = "registerd client id"
CLIENT_SECRET = "registered client secret"

Basic usage

example:

import losuapi

# instantiate OsuApi object
api: losuapi.OsuApi = losuapi.OsuApi(client_id=CLIENT_ID, cleint_secret=CLIENT_SECRET)

# instantiate async compatible OsuApi object
asyncApi: losuapi.AsyncOsuApi = losuapi.AsyncOsuApi(client_id=CLIENT_ID, cleint_secret=CLIENT_SECRET)

# lookup_beatmap method returns a losuapi.Beatmap object
beatmap: losuapi.Beatmap = api.lookup_beatmap(beatmap_id=1920615)

Working endpoints

from losuapi import OsuApi

OsuApi.lookup_beatmap(beatmap_id, checksum, filename)
OsuApi.user_beatmap_score(beatmap_id, user_id, mode, mods)
OsuApi.user_beatmap_scores(beatmap_id, user_id, mode)
OsuApi.beatmap_scores(beatmap_id, mode, mods, Type)
OsuApi.beatmaps(beatmap_ids)
OsuApi.beatmap(beatmap_id)
OsuApi.beatmap_attributes(beatmap_id, mods ruleset, ruleset_id)
OsuApi.user_kudosu(user_id, limit, offset)
OsuApi.user_scores(user_id, Type, include_fails, mode, limit, offset)
OsuApi.user_beatmaps(user_id, Type, limit, offset)
OsuApi.user_recent_activity(user_id, limit, offset)
OsuApi.user(username, mode, key)
OsuApi.users(user_ids)
OsuApi.ranking(mode, Type, filter, country, cursor, spotlight_id, variant)
OsuApi.spotlights()

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

losuapi-0.1.0.tar.gz (24.3 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: losuapi-0.1.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for losuapi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d2f62d4c2b412c1a2ceb2779427c01d227a7d3e9121cae2c440b71db3d3aca53
MD5 042d0c206c79b6680f2565faec4ba943
BLAKE2b-256 d92e494c4007f4c22170610ef7ac0e9b893c9a31dced0d266acb923e9e06bad5

See more details on using hashes here.

Supported by

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