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.8.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

PyBeatSaver-0.1.8-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: PyBeatSaver-0.1.8.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for PyBeatSaver-0.1.8.tar.gz
Algorithm Hash digest
SHA256 0d5b64288bfb6574b47fe9e5c03881b29997411f919ceb4d39e39bc83ee6d600
MD5 bee26ecc3c5a1b28114f95c30a11ccb8
BLAKE2b-256 1e9876591511b6768728c4394c18350f85e640d30221a6cc3bba43281de719db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PyBeatSaver-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for PyBeatSaver-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 48e150182a0f1330c570c3c26d0e6a7184e5f6acaf02a9a2a7e05021acb803bf
MD5 cba5ff1919e5575342f60d12b68f1af6
BLAKE2b-256 44d697b876f666e63a1a9549801389fa3a33e9f0f599adab8595013f7b655eeb

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