summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-18 04:12:57 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-18 04:12:57 +0000
commit6f1bb694c5579f201aee8cafff8f4f789eb2f324 (patch)
tree4b1b5b93b5c81cd1af29f562433165b1ec0ab3ac
parentb374e33442c46d8b333fd2916c3e87b200c5810b (diff)
automatic import of python-adminui
-rw-r--r--.gitignore1
-rw-r--r--python-adminui.spec441
-rw-r--r--sources1
3 files changed, 443 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..2602ba5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/adminui-1.5.1.tar.gz
diff --git a/python-adminui.spec b/python-adminui.spec
new file mode 100644
index 0000000..19ab9ce
--- /dev/null
+++ b/python-adminui.spec
@@ -0,0 +1,441 @@
+%global _empty_manifest_terminate_build 0
+Name: python-adminui
+Version: 1.5.1
+Release: 1
+Summary: Write professional web interface with Python
+License: MIT License
+URL: https://github.com/bigeyex/python-adminui
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/71/b9/e2e70e4f4d5df17a6e8b1ee28a8ff593789fbbb6efd16047f331a3f2c6ba/adminui-1.5.1.tar.gz
+BuildArch: noarch
+
+Requires: python3-Flask
+Requires: python3-PyJWT
+Requires: python3-werkzeug
+
+%description
+# Python AdminUI
+
+[Full Readme at Github](https://github.com/bigeyex/python-adminui)
+[Documentation](https://python-adminui.readthedocs.io/en/latest/index.html)
+[中文文档](https://python-adminui.readthedocs.io/zh_CN/latest/index.html)
+
+Write professional web interface with Python.
+
+If you need a simple web interface and you don't want to mess around with
+HTML, CSS, React, Angular, Webpack or other fancy Javascript frontend stuff,
+this project is for you. Now you can write web pages, forms, charts and dashboards with only Python.
+
+This library is good for: data projects, tools and scripts, small IT systems and management systems,
+Hacker or Hackathon projects. Basically if you need an interface for your system and you don't
+care much about customizing the style or performance for large traffic, consider this package.
+
+This project is based on Flask/FastApi and Ant Design Pro.
+
+![Screen Shot](./screenshot.png)
+
+## Features
+- No HTML, CSS, JS needed
+- Database agnostic: feed content at your own, no matter it's MySql, Sqlite, Excel tables, Firebase or some IoT hardware
+- JWT based authentication/login system with a neat login page
+- Forms and detail pages
+- Line and Bar Chart
+- Create decent looking menus
+- Data tables with pagination
+- Adaptive to small screens and mobile devices
+- Support both Flask and FastApi
+
+# Installation and quick start
+
+install the package with pip:
+
+```
+pip install adminui
+```
+
+The basic "form page" example:
+
+```
+# example_form.py
+from adminui import *
+
+app = AdminApp()
+
+def on_submit(form_data):
+ print(form_data)
+
+@app.page('/', 'form')
+def form_page():
+ return [
+ Form(on_submit = on_submit, content = [
+ TextField('Title', required_message="The title is required!"),
+ TextArea('Description'),
+ FormActions(content = [
+ SubmitButton('Submit')
+ ])
+ ])
+ ]
+
+if __name__ == '__main__':
+ app.run()
+```
+
+Run the Python file:
+
+```
+python example_form.py
+```
+
+Then visit http://127.0.0.1:5000/ to see the result.
+
+## Use FastApi instead of Flask
+
+Set `use_fastapi=True` when creating the `app`; and `prepare()` instead of `run()` to expose the app to uvicorn. See python/example_fastapi.py for details
+
+```
+# instead of app = AdminApp(), use
+app = AdminApp(use_fastapi=True)
+
+# ... other stuff you do with adminui app
+
+# in the end of the main file, use
+fastapi_app = app.prepare()
+
+# in command line, run:
+# uvicorn example_fastapi:fastapi_app
+```
+
+# Documentation
+
+Hosted on [Read the Docs](https://python-adminui.readthedocs.io/en/latest/index.html)
+
+
+# Contributing and Development
+
+This is a personal project. So please create issues to tell me what you need from this project.
+
+You may also give stars to let me know if this project is worthy to invest more time on.
+
+To work with the source code:
+
+This project has a Typescript front-end and a Python backend.
+The front-end is in the `/src` folder.
+The back-end is in the `/python` folder.
+To start developing:
+
+- cd into `/python` folder and run `pip install -r requirements.txt` to install requirements
+- run one of the example_xxx.py file in the `/python` folder
+- Open another terminal, run `npm install` & `npm start` at the root folder to start the frontend;
+
+Under this development mode, requests from front-end will forward to the backend.
+
+When you are done with developing:
+- run `npm run build` will build the project.
+
+The front-end is based on the amazing [Ant Design Pro](https://pro.ant.design/docs/getting-started) library, you may consult their documentation during the development.
+
+The Python backend is located in `/python/adminui`. It is Flask based. There are some examples in the `/python` folder.
+
+
+
+%package -n python3-adminui
+Summary: Write professional web interface with Python
+Provides: python-adminui
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-adminui
+# Python AdminUI
+
+[Full Readme at Github](https://github.com/bigeyex/python-adminui)
+[Documentation](https://python-adminui.readthedocs.io/en/latest/index.html)
+[中文文档](https://python-adminui.readthedocs.io/zh_CN/latest/index.html)
+
+Write professional web interface with Python.
+
+If you need a simple web interface and you don't want to mess around with
+HTML, CSS, React, Angular, Webpack or other fancy Javascript frontend stuff,
+this project is for you. Now you can write web pages, forms, charts and dashboards with only Python.
+
+This library is good for: data projects, tools and scripts, small IT systems and management systems,
+Hacker or Hackathon projects. Basically if you need an interface for your system and you don't
+care much about customizing the style or performance for large traffic, consider this package.
+
+This project is based on Flask/FastApi and Ant Design Pro.
+
+![Screen Shot](./screenshot.png)
+
+## Features
+- No HTML, CSS, JS needed
+- Database agnostic: feed content at your own, no matter it's MySql, Sqlite, Excel tables, Firebase or some IoT hardware
+- JWT based authentication/login system with a neat login page
+- Forms and detail pages
+- Line and Bar Chart
+- Create decent looking menus
+- Data tables with pagination
+- Adaptive to small screens and mobile devices
+- Support both Flask and FastApi
+
+# Installation and quick start
+
+install the package with pip:
+
+```
+pip install adminui
+```
+
+The basic "form page" example:
+
+```
+# example_form.py
+from adminui import *
+
+app = AdminApp()
+
+def on_submit(form_data):
+ print(form_data)
+
+@app.page('/', 'form')
+def form_page():
+ return [
+ Form(on_submit = on_submit, content = [
+ TextField('Title', required_message="The title is required!"),
+ TextArea('Description'),
+ FormActions(content = [
+ SubmitButton('Submit')
+ ])
+ ])
+ ]
+
+if __name__ == '__main__':
+ app.run()
+```
+
+Run the Python file:
+
+```
+python example_form.py
+```
+
+Then visit http://127.0.0.1:5000/ to see the result.
+
+## Use FastApi instead of Flask
+
+Set `use_fastapi=True` when creating the `app`; and `prepare()` instead of `run()` to expose the app to uvicorn. See python/example_fastapi.py for details
+
+```
+# instead of app = AdminApp(), use
+app = AdminApp(use_fastapi=True)
+
+# ... other stuff you do with adminui app
+
+# in the end of the main file, use
+fastapi_app = app.prepare()
+
+# in command line, run:
+# uvicorn example_fastapi:fastapi_app
+```
+
+# Documentation
+
+Hosted on [Read the Docs](https://python-adminui.readthedocs.io/en/latest/index.html)
+
+
+# Contributing and Development
+
+This is a personal project. So please create issues to tell me what you need from this project.
+
+You may also give stars to let me know if this project is worthy to invest more time on.
+
+To work with the source code:
+
+This project has a Typescript front-end and a Python backend.
+The front-end is in the `/src` folder.
+The back-end is in the `/python` folder.
+To start developing:
+
+- cd into `/python` folder and run `pip install -r requirements.txt` to install requirements
+- run one of the example_xxx.py file in the `/python` folder
+- Open another terminal, run `npm install` & `npm start` at the root folder to start the frontend;
+
+Under this development mode, requests from front-end will forward to the backend.
+
+When you are done with developing:
+- run `npm run build` will build the project.
+
+The front-end is based on the amazing [Ant Design Pro](https://pro.ant.design/docs/getting-started) library, you may consult their documentation during the development.
+
+The Python backend is located in `/python/adminui`. It is Flask based. There are some examples in the `/python` folder.
+
+
+
+%package help
+Summary: Development documents and examples for adminui
+Provides: python3-adminui-doc
+%description help
+# Python AdminUI
+
+[Full Readme at Github](https://github.com/bigeyex/python-adminui)
+[Documentation](https://python-adminui.readthedocs.io/en/latest/index.html)
+[中文文档](https://python-adminui.readthedocs.io/zh_CN/latest/index.html)
+
+Write professional web interface with Python.
+
+If you need a simple web interface and you don't want to mess around with
+HTML, CSS, React, Angular, Webpack or other fancy Javascript frontend stuff,
+this project is for you. Now you can write web pages, forms, charts and dashboards with only Python.
+
+This library is good for: data projects, tools and scripts, small IT systems and management systems,
+Hacker or Hackathon projects. Basically if you need an interface for your system and you don't
+care much about customizing the style or performance for large traffic, consider this package.
+
+This project is based on Flask/FastApi and Ant Design Pro.
+
+![Screen Shot](./screenshot.png)
+
+## Features
+- No HTML, CSS, JS needed
+- Database agnostic: feed content at your own, no matter it's MySql, Sqlite, Excel tables, Firebase or some IoT hardware
+- JWT based authentication/login system with a neat login page
+- Forms and detail pages
+- Line and Bar Chart
+- Create decent looking menus
+- Data tables with pagination
+- Adaptive to small screens and mobile devices
+- Support both Flask and FastApi
+
+# Installation and quick start
+
+install the package with pip:
+
+```
+pip install adminui
+```
+
+The basic "form page" example:
+
+```
+# example_form.py
+from adminui import *
+
+app = AdminApp()
+
+def on_submit(form_data):
+ print(form_data)
+
+@app.page('/', 'form')
+def form_page():
+ return [
+ Form(on_submit = on_submit, content = [
+ TextField('Title', required_message="The title is required!"),
+ TextArea('Description'),
+ FormActions(content = [
+ SubmitButton('Submit')
+ ])
+ ])
+ ]
+
+if __name__ == '__main__':
+ app.run()
+```
+
+Run the Python file:
+
+```
+python example_form.py
+```
+
+Then visit http://127.0.0.1:5000/ to see the result.
+
+## Use FastApi instead of Flask
+
+Set `use_fastapi=True` when creating the `app`; and `prepare()` instead of `run()` to expose the app to uvicorn. See python/example_fastapi.py for details
+
+```
+# instead of app = AdminApp(), use
+app = AdminApp(use_fastapi=True)
+
+# ... other stuff you do with adminui app
+
+# in the end of the main file, use
+fastapi_app = app.prepare()
+
+# in command line, run:
+# uvicorn example_fastapi:fastapi_app
+```
+
+# Documentation
+
+Hosted on [Read the Docs](https://python-adminui.readthedocs.io/en/latest/index.html)
+
+
+# Contributing and Development
+
+This is a personal project. So please create issues to tell me what you need from this project.
+
+You may also give stars to let me know if this project is worthy to invest more time on.
+
+To work with the source code:
+
+This project has a Typescript front-end and a Python backend.
+The front-end is in the `/src` folder.
+The back-end is in the `/python` folder.
+To start developing:
+
+- cd into `/python` folder and run `pip install -r requirements.txt` to install requirements
+- run one of the example_xxx.py file in the `/python` folder
+- Open another terminal, run `npm install` & `npm start` at the root folder to start the frontend;
+
+Under this development mode, requests from front-end will forward to the backend.
+
+When you are done with developing:
+- run `npm run build` will build the project.
+
+The front-end is based on the amazing [Ant Design Pro](https://pro.ant.design/docs/getting-started) library, you may consult their documentation during the development.
+
+The Python backend is located in `/python/adminui`. It is Flask based. There are some examples in the `/python` folder.
+
+
+
+%prep
+%autosetup -n adminui-1.5.1
+
+%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-adminui -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu May 18 2023 Python_Bot <Python_Bot@openeuler.org> - 1.5.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..51325ab
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+8ee40d7a7c0b54541047558814a5c51e adminui-1.5.1.tar.gz