%global _empty_manifest_terminate_build 0 Name: python-mal-api Version: 0.5.3 Release: 1 Summary: A local MyAnimeList API License: MIT URL: https://github.com/darenliang/mal-api Source0: https://mirrors.nju.edu.cn/pypi/web/packages/47/20/6ea09874fbed7109010a22c0c48ec9f3fb066517154ed77aa0436ea36849/mal-api-0.5.3.tar.gz BuildArch: noarch Requires: python3-requests Requires: python3-beautifulsoup4 %description # Python MAL API [![pypi Version](https://img.shields.io/pypi/v/mal-api.svg?color=informational)](https://pypi.org/project/mal-api/) An unofficial MyAnimeList API for Python 3. Currently, the API does not feature any kind of rate limiting. Use the API in moderation and rate limit your queries (0.5 seconds is sufficient to my knowledge). This API uses cached webpage data to increase efficiency and save bandwidth. If you want to refresh your data, you must manually refresh the object. The API is currently incomplete. More features are to come. If there are any features that you wish to be supported, please raise an issue. Any feedback is also appreciated. ## API Documentation [ReadTheDocs Documentation](https://mal-api.readthedocs.io) ## Installation and Usage To install the library: ``` pip install -U mal-api ``` To import the library: ```python from mal import * ``` ## Example To call the API, you need to create an object. #### ID Query Example ```python from mal import Anime anime = Anime(1) # Cowboy Bebop print(anime.score) # prints 8.82 anime.reload() # reload object print(anime.score) # prints 8.81 ``` #### Search Query Example ```python from mal import AnimeSearch search = AnimeSearch("cowboy bebop") # Search for "cowboy bebop" print(search.results[0].title) # Get title of first result ``` ## Configuration To configure timeout (default timeout is 5 seconds): ```python from mal import Anime from mal import config config.TIMEOUT = 1 # Import level config anime = Anime(1, timeout=1) # Object level config ``` %package -n python3-mal-api Summary: A local MyAnimeList API Provides: python-mal-api BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-mal-api # Python MAL API [![pypi Version](https://img.shields.io/pypi/v/mal-api.svg?color=informational)](https://pypi.org/project/mal-api/) An unofficial MyAnimeList API for Python 3. Currently, the API does not feature any kind of rate limiting. Use the API in moderation and rate limit your queries (0.5 seconds is sufficient to my knowledge). This API uses cached webpage data to increase efficiency and save bandwidth. If you want to refresh your data, you must manually refresh the object. The API is currently incomplete. More features are to come. If there are any features that you wish to be supported, please raise an issue. Any feedback is also appreciated. ## API Documentation [ReadTheDocs Documentation](https://mal-api.readthedocs.io) ## Installation and Usage To install the library: ``` pip install -U mal-api ``` To import the library: ```python from mal import * ``` ## Example To call the API, you need to create an object. #### ID Query Example ```python from mal import Anime anime = Anime(1) # Cowboy Bebop print(anime.score) # prints 8.82 anime.reload() # reload object print(anime.score) # prints 8.81 ``` #### Search Query Example ```python from mal import AnimeSearch search = AnimeSearch("cowboy bebop") # Search for "cowboy bebop" print(search.results[0].title) # Get title of first result ``` ## Configuration To configure timeout (default timeout is 5 seconds): ```python from mal import Anime from mal import config config.TIMEOUT = 1 # Import level config anime = Anime(1, timeout=1) # Object level config ``` %package help Summary: Development documents and examples for mal-api Provides: python3-mal-api-doc %description help # Python MAL API [![pypi Version](https://img.shields.io/pypi/v/mal-api.svg?color=informational)](https://pypi.org/project/mal-api/) An unofficial MyAnimeList API for Python 3. Currently, the API does not feature any kind of rate limiting. Use the API in moderation and rate limit your queries (0.5 seconds is sufficient to my knowledge). This API uses cached webpage data to increase efficiency and save bandwidth. If you want to refresh your data, you must manually refresh the object. The API is currently incomplete. More features are to come. If there are any features that you wish to be supported, please raise an issue. Any feedback is also appreciated. ## API Documentation [ReadTheDocs Documentation](https://mal-api.readthedocs.io) ## Installation and Usage To install the library: ``` pip install -U mal-api ``` To import the library: ```python from mal import * ``` ## Example To call the API, you need to create an object. #### ID Query Example ```python from mal import Anime anime = Anime(1) # Cowboy Bebop print(anime.score) # prints 8.82 anime.reload() # reload object print(anime.score) # prints 8.81 ``` #### Search Query Example ```python from mal import AnimeSearch search = AnimeSearch("cowboy bebop") # Search for "cowboy bebop" print(search.results[0].title) # Get title of first result ``` ## Configuration To configure timeout (default timeout is 5 seconds): ```python from mal import Anime from mal import config config.TIMEOUT = 1 # Import level config anime = Anime(1, timeout=1) # Object level config ``` %prep %autosetup -n mal-api-0.5.3 %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-mal-api -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 0.5.3-1 - Package Spec generated