%global _empty_manifest_terminate_build 0 Name: python-PyBeatSaver Version: 0.1.15 Release: 1 Summary: Beat Saver API wrapper License: MIT License URL: https://github.com/Kiyomi-Parents/PyBeatSaver Source0: https://mirrors.aliyun.com/pypi/web/packages/0a/83/ededce13512e8263e8d3655e48cf125a0451c31c2d13ed0315d0503670ff/PyBeatSaver-0.1.15.tar.gz BuildArch: noarch Requires: python3-OutCache Requires: python3-dateutil Requires: python3-marshmallow Requires: python3-dataclasses-json Requires: python3-aiohttp Requires: python3-Faker Requires: python3-coverage Requires: python3-pytest Requires: python3-pytest-asyncio Requires: python3-pytest-cov %description [![GitHub license](https://img.shields.io/github/license/Kiyomi-Parents/PyBeatSaver)](https://github.com/Kiyomi-Parents/PyBeatSaver/blob/master/LICENSE) [![PyPI version](https://badge.fury.io/py/PyBeatSaver.svg)](https://pypi.org/project/PyBeatSaver) [![codecov](https://codecov.io/gh/Kiyomi-Parents/PyBeatSaver/branch/master/graph/badge.svg?token=IUFZTBDVEE)](https://codecov.io/gh/Kiyomi-Parents/PyBeatSaver) [![PyPI supported Python versions](https://img.shields.io/pypi/pyversions/pybeatsaver.svg)](https://pypi.org/project/PyBeatSaver) [![PyPI downloads](https://img.shields.io/pypi/dm/pybeatsaver?color=blueviolet&logo=pypi)](https://pypi.org/project/PyBeatSaver) # 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: ```python 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: ```python from faker import Faker from pybeatsaver import BeatSaverProvider faker = Faker() faker.add_provider(BeatSaverProvider) beatmap = faker.map_detail() print(beatmap) ``` %package -n python3-PyBeatSaver Summary: Beat Saver API wrapper Provides: python-PyBeatSaver BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-PyBeatSaver [![GitHub license](https://img.shields.io/github/license/Kiyomi-Parents/PyBeatSaver)](https://github.com/Kiyomi-Parents/PyBeatSaver/blob/master/LICENSE) [![PyPI version](https://badge.fury.io/py/PyBeatSaver.svg)](https://pypi.org/project/PyBeatSaver) [![codecov](https://codecov.io/gh/Kiyomi-Parents/PyBeatSaver/branch/master/graph/badge.svg?token=IUFZTBDVEE)](https://codecov.io/gh/Kiyomi-Parents/PyBeatSaver) [![PyPI supported Python versions](https://img.shields.io/pypi/pyversions/pybeatsaver.svg)](https://pypi.org/project/PyBeatSaver) [![PyPI downloads](https://img.shields.io/pypi/dm/pybeatsaver?color=blueviolet&logo=pypi)](https://pypi.org/project/PyBeatSaver) # 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: ```python 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: ```python from faker import Faker from pybeatsaver import BeatSaverProvider faker = Faker() faker.add_provider(BeatSaverProvider) beatmap = faker.map_detail() print(beatmap) ``` %package help Summary: Development documents and examples for PyBeatSaver Provides: python3-PyBeatSaver-doc %description help [![GitHub license](https://img.shields.io/github/license/Kiyomi-Parents/PyBeatSaver)](https://github.com/Kiyomi-Parents/PyBeatSaver/blob/master/LICENSE) [![PyPI version](https://badge.fury.io/py/PyBeatSaver.svg)](https://pypi.org/project/PyBeatSaver) [![codecov](https://codecov.io/gh/Kiyomi-Parents/PyBeatSaver/branch/master/graph/badge.svg?token=IUFZTBDVEE)](https://codecov.io/gh/Kiyomi-Parents/PyBeatSaver) [![PyPI supported Python versions](https://img.shields.io/pypi/pyversions/pybeatsaver.svg)](https://pypi.org/project/PyBeatSaver) [![PyPI downloads](https://img.shields.io/pypi/dm/pybeatsaver?color=blueviolet&logo=pypi)](https://pypi.org/project/PyBeatSaver) # 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: ```python 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: ```python from faker import Faker from pybeatsaver import BeatSaverProvider faker = Faker() faker.add_provider(BeatSaverProvider) beatmap = faker.map_detail() print(beatmap) ``` %prep %autosetup -n PyBeatSaver-0.1.15 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-PyBeatSaver -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri Jun 09 2023 Python_Bot - 0.1.15-1 - Package Spec generated