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

Uploaded Source

Built Distribution

PyBeatSaver-0.1.0-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: PyBeatSaver-0.1.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.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.0.tar.gz
Algorithm Hash digest
SHA256 6ebab55bb46e0a34bc4c77538bb65628d85df99760ae617541c4e9ea32122b47
MD5 3370ede28b4c6788839b66cd15f25f34
BLAKE2b-256 b6aaaafc49e5abef8813ec8467a3bf5b1baf13aaaa9cd8729d90240be3ce8917

See more details on using hashes here.

File details

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

File metadata

  • Download URL: PyBeatSaver-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a7e9a3d6262c956e2f2188953925c32e94d153a0a291364b8b676b39e1ee4b9
MD5 aaf74fec8808931ed33a5029c1683b35
BLAKE2b-256 4805a495ca15e9144c1af5c32f7509a69eca69a326d8c58cfc0fcb159f6a45d2

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