Skip to main content

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

Metadata

Release files for beatsaver.py 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beatsaver.py 0.0.1
File Size Uploaded Provenance Actions
beatsaver.py-0.0.1.tar.gz 8.0 kB Without provenance Details for beatsaver.py-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for beatsaver.py 0.0.1
File Interpreter ABI Platform Actions
beatsaver.py-0.0.1-py3-none-any.whl Python 3 none any Details for beatsaver.py-0.0.1-py3-none-any.whl

Total release size: 17.6 kB

Release files / beatsaver.py-0.0.1.tar.gz

Download URL beatsaver.py-0.0.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
38678745a0d2945f629261c0ccbd5ccbae5f34fd676179deeb31b491e05531d7
BLAKE2b-256 checksum
How to use checksums
f4deab525505884b691ea8191b539be96eda4a489baa5659c2ad3f5583b2ab38
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / beatsaver.py-0.0.1-py3-none-any.whl

Download URL beatsaver.py-0.0.1-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
551eeb34ec323cd7b64b3063de7f830ca9f7046401ed6eeed6761ca45ed40d91
BLAKE2b-256 checksum
How to use checksums
44c79547c3d60288deffd6aa1fbe4220d68ad69eb4bbfc0f499bc7727bfecb2f
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for beatsaver.py 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page