diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-fastapi-generator.spec | 272 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 274 insertions, 0 deletions
@@ -0,0 +1 @@ +/fastapi_generator-0.5.1.tar.gz diff --git a/python-fastapi-generator.spec b/python-fastapi-generator.spec new file mode 100644 index 0000000..a7cc0f7 --- /dev/null +++ b/python-fastapi-generator.spec @@ -0,0 +1,272 @@ +%global _empty_manifest_terminate_build 0 +Name: python-fastapi-generator +Version: 0.5.1 +Release: 1 +Summary: Used to quickly generate fastapi project. +License: MIT License +URL: https://github.com/StevenLianaL/fastapi_generator +Source0: https://mirrors.aliyun.com/pypi/web/packages/d1/81/eadcbd4bf441587c2da719561c3a55ab887d912d7b7d0a09e2699d78ea07/fastapi_generator-0.5.1.tar.gz +BuildArch: noarch + +Requires: python3-click +Requires: python3-fastapi +Requires: python3-uvicorn +Requires: python3-sqlalchemy +Requires: python3-databases +Requires: python3-aiomysql +Requires: python3-mysqlclient +Requires: python3-pandas + +%description +# Document +## Description +- This project is used to quickly generate fastapi project. +## Flow for Main App +1. run main app command +2. config config.py db or set in environment +## Requirements +- python 3.8 +- click +- pandas +- databases +## Command + # generate main app + fastapi main + # generate main app with orm + fastapi orm db_host db_name db_user db_pswd + # only generate orm + fastapi orm --only db_host db_name db_user db_pswd + fastapi orm localhost test test test + fastapi orm --mode t + # generate sub app + fastapi sub app-name + # generate api from sub app / if app not exist, create it. + fastapi api app-name api-name + # run fastapi app + uvicorn app.main:app --reload + + + + + +## Version +- 0.5.1 + - fix error import auth headers +- 0.5.0 + - update more tortoise orm + - use more template code +- 0.4.0 + - support tortoise orm with mode t +- 0.3.7 + - add param is_only_orm +- 0.3.6 + - add orm generate +- 0.3.5 + - update command with click +- 0.3 + - generate api of sub app. +- 0.2.1 + - generate sub app with auto load api +- 0.2 + - generate sub app +- 0.1.3 + - auto load sub app +- 0.1.2 + - write main app project files +- 0.1.1 + - generate with orm +- 0.1 + - generate base app: can run it! +- 0.0.2 + - create main app files +- 0.0.1 + - only create app/main.py + + + +%package -n python3-fastapi-generator +Summary: Used to quickly generate fastapi project. +Provides: python-fastapi-generator +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-fastapi-generator +# Document +## Description +- This project is used to quickly generate fastapi project. +## Flow for Main App +1. run main app command +2. config config.py db or set in environment +## Requirements +- python 3.8 +- click +- pandas +- databases +## Command + # generate main app + fastapi main + # generate main app with orm + fastapi orm db_host db_name db_user db_pswd + # only generate orm + fastapi orm --only db_host db_name db_user db_pswd + fastapi orm localhost test test test + fastapi orm --mode t + # generate sub app + fastapi sub app-name + # generate api from sub app / if app not exist, create it. + fastapi api app-name api-name + # run fastapi app + uvicorn app.main:app --reload + + + + + +## Version +- 0.5.1 + - fix error import auth headers +- 0.5.0 + - update more tortoise orm + - use more template code +- 0.4.0 + - support tortoise orm with mode t +- 0.3.7 + - add param is_only_orm +- 0.3.6 + - add orm generate +- 0.3.5 + - update command with click +- 0.3 + - generate api of sub app. +- 0.2.1 + - generate sub app with auto load api +- 0.2 + - generate sub app +- 0.1.3 + - auto load sub app +- 0.1.2 + - write main app project files +- 0.1.1 + - generate with orm +- 0.1 + - generate base app: can run it! +- 0.0.2 + - create main app files +- 0.0.1 + - only create app/main.py + + + +%package help +Summary: Development documents and examples for fastapi-generator +Provides: python3-fastapi-generator-doc +%description help +# Document +## Description +- This project is used to quickly generate fastapi project. +## Flow for Main App +1. run main app command +2. config config.py db or set in environment +## Requirements +- python 3.8 +- click +- pandas +- databases +## Command + # generate main app + fastapi main + # generate main app with orm + fastapi orm db_host db_name db_user db_pswd + # only generate orm + fastapi orm --only db_host db_name db_user db_pswd + fastapi orm localhost test test test + fastapi orm --mode t + # generate sub app + fastapi sub app-name + # generate api from sub app / if app not exist, create it. + fastapi api app-name api-name + # run fastapi app + uvicorn app.main:app --reload + + + + + +## Version +- 0.5.1 + - fix error import auth headers +- 0.5.0 + - update more tortoise orm + - use more template code +- 0.4.0 + - support tortoise orm with mode t +- 0.3.7 + - add param is_only_orm +- 0.3.6 + - add orm generate +- 0.3.5 + - update command with click +- 0.3 + - generate api of sub app. +- 0.2.1 + - generate sub app with auto load api +- 0.2 + - generate sub app +- 0.1.3 + - auto load sub app +- 0.1.2 + - write main app project files +- 0.1.1 + - generate with orm +- 0.1 + - generate base app: can run it! +- 0.0.2 + - create main app files +- 0.0.1 + - only create app/main.py + + + +%prep +%autosetup -n fastapi_generator-0.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-fastapi-generator -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.5.1-1 +- Package Spec generated @@ -0,0 +1 @@ +13698f8538a43e1d438c89a0164ad298 fastapi_generator-0.5.1.tar.gz |