Last updated:
0 purchases
PyBeatSaver 0.1.15
PyBeatSaver
Beat Saver API wrapper
Features
Rate Limit handling
Query Caching
Everything is async
Additional helper methods and async generators
Faker data provider
The faker data mode can be activated with the following 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, BeatSaver
async def main():
async with BeatSaverAPI() as beatsaver:
beatmap = await beatsaver.beatmap("16d22")
print(beatmap)
# Without "async with" syntax
async def main2():
beatsaver = BeatSaver()
await beatsaver.start()
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(main2())
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)
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.