summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 08:49:59 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 08:49:59 +0000
commit96821d70c2c05117008e31af1e13a008d0ebfe31 (patch)
treefb3f13e4547d1e06858b8faf191f273bf89b108b
parent4885e521a22f6d0dc2e17bd96fe4360a12fb1360 (diff)
automatic import of python-rest-in-peace
-rw-r--r--.gitignore1
-rw-r--r--python-rest-in-peace.spec273
-rw-r--r--sources1
3 files changed, 275 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..e543de4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/Rest-In-Peace-0.3.2.tar.gz
diff --git a/python-rest-in-peace.spec b/python-rest-in-peace.spec
new file mode 100644
index 0000000..07c2e9f
--- /dev/null
+++ b/python-rest-in-peace.spec
@@ -0,0 +1,273 @@
+%global _empty_manifest_terminate_build 0
+Name: python-Rest-In-Peace
+Version: 0.3.2
+Release: 1
+Summary: An instant and schemaless rest api with sqlite
+License: MIT
+URL: https://github.com/henriquegogo/rest_in_peace
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b3/da/28f17af42be53d19ce1fdf5eba1090a81268217279912c5c2711a2f69b83/Rest-In-Peace-0.3.2.tar.gz
+BuildArch: noarch
+
+
+%description
+# Rest-In-Peace (Database API)
+
+## What is this?
+It's a database abstraction to use as a REST API with zero config.
+
+## How to use
+```
+$ pip install rest-in-peace
+$ rest-in-peace database.db 8000
+```
+
+## Routes
+Static server. Return 'public/index.html' (Tip: Download and use Swagger here)
+```
+GET /
+```
+
+Return API definitions
+```
+GET /openapi.json
+```
+
+Return all items from collection
+```
+GET /{collection}
+```
+
+Delete collection
+```
+DELETE /{collection}
+```
+
+Get a specific item
+```
+GET /{collection}/{id}
+```
+
+Create an item
+```
+POST /{collection}/{id}
+DATA 'Data'
+```
+
+Update an item
+```
+PUT /{collection}/{id}
+DATA 'Data'
+```
+
+Delete an item
+```
+DELETE /{collection}/{id}
+```
+
+## Tests
+```
+python tests
+```
+
+## Next steps
+- Auth / Roles
+- Dynamic / Static schema
+- SQL Injection fix
+
+# License
+MIT
+
+
+
+%package -n python3-Rest-In-Peace
+Summary: An instant and schemaless rest api with sqlite
+Provides: python-Rest-In-Peace
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-Rest-In-Peace
+# Rest-In-Peace (Database API)
+
+## What is this?
+It's a database abstraction to use as a REST API with zero config.
+
+## How to use
+```
+$ pip install rest-in-peace
+$ rest-in-peace database.db 8000
+```
+
+## Routes
+Static server. Return 'public/index.html' (Tip: Download and use Swagger here)
+```
+GET /
+```
+
+Return API definitions
+```
+GET /openapi.json
+```
+
+Return all items from collection
+```
+GET /{collection}
+```
+
+Delete collection
+```
+DELETE /{collection}
+```
+
+Get a specific item
+```
+GET /{collection}/{id}
+```
+
+Create an item
+```
+POST /{collection}/{id}
+DATA 'Data'
+```
+
+Update an item
+```
+PUT /{collection}/{id}
+DATA 'Data'
+```
+
+Delete an item
+```
+DELETE /{collection}/{id}
+```
+
+## Tests
+```
+python tests
+```
+
+## Next steps
+- Auth / Roles
+- Dynamic / Static schema
+- SQL Injection fix
+
+# License
+MIT
+
+
+
+%package help
+Summary: Development documents and examples for Rest-In-Peace
+Provides: python3-Rest-In-Peace-doc
+%description help
+# Rest-In-Peace (Database API)
+
+## What is this?
+It's a database abstraction to use as a REST API with zero config.
+
+## How to use
+```
+$ pip install rest-in-peace
+$ rest-in-peace database.db 8000
+```
+
+## Routes
+Static server. Return 'public/index.html' (Tip: Download and use Swagger here)
+```
+GET /
+```
+
+Return API definitions
+```
+GET /openapi.json
+```
+
+Return all items from collection
+```
+GET /{collection}
+```
+
+Delete collection
+```
+DELETE /{collection}
+```
+
+Get a specific item
+```
+GET /{collection}/{id}
+```
+
+Create an item
+```
+POST /{collection}/{id}
+DATA 'Data'
+```
+
+Update an item
+```
+PUT /{collection}/{id}
+DATA 'Data'
+```
+
+Delete an item
+```
+DELETE /{collection}/{id}
+```
+
+## Tests
+```
+python tests
+```
+
+## Next steps
+- Auth / Roles
+- Dynamic / Static schema
+- SQL Injection fix
+
+# License
+MIT
+
+
+
+%prep
+%autosetup -n Rest-In-Peace-0.3.2
+
+%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-Rest-In-Peace -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..4c0cc80
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+a3332b6619c3f21b35489c004d950964 Rest-In-Peace-0.3.2.tar.gz