diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-05 06:25:43 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 06:25:43 +0000 |
commit | 95dea243042647c6613f2d18e31ba1275df99f33 (patch) | |
tree | fa1d5388d99456db4086cf2665ef8fb2b2af05ba | |
parent | 045266fa4c355e9e09cd0afdb63360991095500b (diff) |
automatic import of python-mal-apiopeneuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-mal-api.spec | 299 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 301 insertions, 0 deletions
@@ -0,0 +1 @@ +/mal-api-0.5.3.tar.gz diff --git a/python-mal-api.spec b/python-mal-api.spec new file mode 100644 index 0000000..0118438 --- /dev/null +++ b/python-mal-api.spec @@ -0,0 +1,299 @@ +%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
+
+[](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
+
+[](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
+
+[](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 <Python_Bot@openeuler.org> - 0.5.3-1 +- Package Spec generated @@ -0,0 +1 @@ +61696b4efd2204ca612555da403886d0 mal-api-0.5.3.tar.gz |