Skip to main content

Beat Saver API client

Project description

PyPI version

PyBeatSaver

Beat Saver API client

Comes with caching and rate limiting out of the box.

There is also a test mode which can be enabled like this beatsaver = BeatSaverAPI(test_mode=True). This will return random data instead of making API requests to Beat Saver.

Usage:

import asyncio
from pybeatsaver import BeatSaverAPI


async def main():
    async with BeatSaverAPI() as beatsaver:
        beatmap = await beatsaver.beatmap("16d22")
        print(beatmap)

# Get fake data instead
async def main_fake():
    async with BeatSaverAPI(test_mode=True) as beatsaver:
        beatmap = await beatsaver.beatmap("16d22")
        print(beatmap)

asyncio.run(main())
asyncio.run(main_fake())

Faker provider:

from faker import Faker
from pybeatsaver import BeatSaverProvider

faker = Faker()
faker.add_provider(BeatSaverProvider)

beatmap = faker.map_detail()
print(beatmap)

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

PyBeatSaver-0.1.5.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

PyBeatSaver-0.1.5-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file PyBeatSaver-0.1.5.tar.gz.

File metadata

  • Download URL: PyBeatSaver-0.1.5.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for PyBeatSaver-0.1.5.tar.gz
Algorithm Hash digest
SHA256 7aa165b319cda622e0a25620ec18e2cf687dd66b6258f43fd006bc10302fd4bc
MD5 7dcaeac3b7c7f26c426588a9ebff543b
BLAKE2b-256 6b2951d37e7806db21448222b2c9ae07ff0e6c765ac2fb8d519901f83b461a4e

See more details on using hashes here.

File details

Details for the file PyBeatSaver-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: PyBeatSaver-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for PyBeatSaver-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1ad5c8bbbd609413671e8ba66f06075a4c56e5d0a98d09940de3ac804cb1b6a2
MD5 9ffebd910fe6bbce036192f29e652975
BLAKE2b-256 7f0a987adc72248471272c17934cca91bee5540f18d952f96eb7751c993800ff

See more details on using hashes here.

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