An API wrapper for BeatSaver
Project description
BeatSaver.py
An API wrapper for BeatSaver.com which can handle synchronous or asynchronous GET requests.
Installing
This library can be installed via pip
pip install beatsaver.py --upgrade
Usage
Initialization
from beatsaver.beatsaver import BeatSaver
# While recommended the user_agent parameter isn't required.
beatsaver = BeatSaver(user_agent="My_Awesome_Program! v0.0.1")
Or for asynchronous requests
from beatsaver.async_beatsaver import BeatSaverAsync
beatsaver = BeatSaverAsync()
Getting map by id (key)
beatsaver.get_maps_id("e970")
# Returns MapDetail class
Getting map by hash
beatsaver.get_maps_hash("69e494f4a295197bf03720029086fabe6856fbce")
# Returns MapDetail class
Getting maps by uploader
beatsaver.get_maps_uploader(15293)
# Returns list of MapDetail
Getting latest maps
beatsaver.get_maps_latest()
# Returns list of MapDetail
Getting maps ordered by play count
beatsaver.get_maps_plays()
# Returns list of MapDetail
Getting user info
beatsaver.get_users_id(15293)
# Returns UserDetail class
Searching for maps
beatsaver.get_search_text(query="Shiny Happy Days")
# Returns list of MapDetail
# This function takes a ton of parameters, check it's docstring for them.
Class Models
MapDetail
id: str
name: str
description: str
uploader: UserDetail
metadata: MapDetailMetadata
stats: MapStats
uploaded: str
automapper: bool
ranked: bool
qualified: bool
versions: List[MapVersion]
MapDetailMetadata
bpm: float
duration: int
songName: str
songSubName: str
songAuthorName: str
levelAuthorName: str
MapVersion
hash: str
key: Union[str, NoneType]
state: str
createdAt: str
sageScore: int
diffs: List[MapDifficulty]
downloadURL: str
coverURL: str
previewURL: str
MapDifficulty
njs: float
offset: float
notes: int
bombs: int
obstacles: int
nps: float
length: float
characteristic: str
difficulty: str
events: int
chroma: bool
me: bool
ne: bool
cinema: bool
seconds: float
paritySummary: MapParitySummary
stars: Union[float, NoneType]
MapParitySummary
errors: int
warns: int
resets: int
MapStats
plays: int
downloads: int
upvotes: int
downvotes: int
score: float
UserDetail
id: str
name: str
hash: Union[str, NoneType]
avatar: str
stats: UserStats
UserStats
totalUpvotes: int
totalDownvotes: int
totalMaps: int
rankedMaps: int
avgBpm: float
avgDuration: float
avgScore: float
firstUpload: str
lastUpload: str
diffStats: UserDiffStats
UserDiffStats
easy: int
expert: int
expertPlus: int
hard: int
normal: int
total: int
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
beatsaver.py-0.0.1.tar.gz
(8.0 kB
view details)
Built Distribution
File details
Details for the file beatsaver.py-0.0.1.tar.gz
.
File metadata
- Download URL: beatsaver.py-0.0.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38678745a0d2945f629261c0ccbd5ccbae5f34fd676179deeb31b491e05531d7 |
|
MD5 | 1c7f9e4e00fa8908beea5473efb4a56d |
|
BLAKE2b-256 | f4deab525505884b691ea8191b539be96eda4a489baa5659c2ad3f5583b2ab38 |
File details
Details for the file beatsaver.py-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: beatsaver.py-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 551eeb34ec323cd7b64b3063de7f830ca9f7046401ed6eeed6761ca45ed40d91 |
|
MD5 | 42b5f69657936a2791b7874f6d0f06e8 |
|
BLAKE2b-256 | 44c79547c3d60288deffd6aa1fbe4220d68ad69eb4bbfc0f499bc7727bfecb2f |