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

Uploaded Source

Built Distribution

PyBeatSaver-0.1.2-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: PyBeatSaver-0.1.2.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for PyBeatSaver-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ca8c6b2b674a4e5277f9aee267e06938910dd7beea86f6fce3b61dfbdc18563f
MD5 0aff328f05c899a5e25b3c472ece490e
BLAKE2b-256 8edff88b4acdccae16cbdf9cec9e30b63e7ef8b0560002b691b5023d77e1e64c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PyBeatSaver-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for PyBeatSaver-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a1c2dd8a224aaffa4e9a13a5109d9c4d06de874f679fa6735294fe4bdf40e46
MD5 ba66ce56d1b77ba632d2f6bf4a53d009
BLAKE2b-256 4910160242b73c3c35bf0c0e86a3c1b4e6d253327f00c986c5b5c5543e1fb935

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