Skip to main content

A wrapper made for the osu! v2 API.

Project description

oppy (op.py)

oppy is the wrapper for use on the osu! v2 api. Version 1.0.0

repo

Installation

To install please use pip to install oppy

pip install oppy

Usage - User Data

import oppy
import asyncio
client = oppy.Client()
user = client.user_data
async def main():
    data = await user.user(user="peppy", token="a long string") #makes the api request using oppy.Client.user_data.user()
    print(
    data.pp,
    data.id,
    data.username,
    data.global_rank,
    ) # returns the users raw pp, id, name and global rank
asyncio.run(main())

Usage - Beatmap Data | Lookup

import oppy
import asyncio
client = oppy.Client()
beatmap = client.beatmap_data
async def main():
    data = await beatmap.lookup(beatmap="big black", token="a long string") #makes the api request using oppy.Client.beatmap_data.lookup()
    print(
    data.id,
    data.artist,
    data.mapper,
    ) # returns the beatmap id
asyncio.run(main())

Usage - Token

import oppy
import asyncio
client = oppy.Client()
tk = client.gen_token
async def main():
    tkn = await tk.gen(client_secret="string", client_id=0) # makes request using oppy.Client.gen_token.gen()
    print(tkn)
asyncio.run(main())

Support

Feel free to email me at wayde@alphaxdev.xyz or contact me on discord support server https://discord.gg/DAPgevH9EX

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

op.py-1.0.0.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file op.py-1.0.0.tar.gz.

File metadata

  • Download URL: op.py-1.0.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.2

File hashes

Hashes for op.py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a664fd7f528af51ead81b4665e62806a84f7fda234d9ee97fac260822890af2b
MD5 4c6001a577646cb1b853ea05614b9124
BLAKE2b-256 743ee471e06f07bcf701121b3cc7f88dbf6533b937cb258ca3b1fffe873a9a3f

See more details on using hashes here.

Supported by

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