Skip to main content

Simple startapp for fastapi and flask

Project description

StartApp

Simple boilerplate ready for development

MIT licensed GitHub stars GitHub forks GitHub issues Downloads

Notes

  • Currently supported frameworks are: FastApi, Flask

๐Ÿ”จ Installation

 $ sudo pip3 install startapp

๐Ÿ•น Guide

startapp  --help 
  • Type startapp on terminal press enter, questions will promt on terminal choose accroding to your taste.
Right after your choice do the followings accrodingly: 

for fastapi:

source .venv/bin/activate


export settings=dev

pip install -r requirements.txt 

uvicorn app.main:app --reload --port 8007

for flask:

source .venv/bin/activate

pip install -r requirements.txt

export FLASK_APP=app.app

export settings=dev

flask run

Flask Structure

โ”œโ”€โ”€ app
โ”‚ย ย  โ”œโ”€โ”€ controllers
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ app.py
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ __init__.py
โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  โ”œโ”€โ”€ models
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ models.py
โ”‚ย ย  โ”œโ”€โ”€ serializers
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ serializer.py
โ”‚ย ย  โ””โ”€โ”€ utils.py
โ”œโ”€โ”€ app_init
โ”‚ย ย  โ”œโ”€โ”€ app_factory.py
โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  
โ”‚ย ย      
โ”‚ย ย      
โ”œโ”€โ”€ extensions
โ”‚ย ย  โ”œโ”€โ”€ db_conf.py
โ”‚ย ย  โ”œโ”€โ”€ extension.py
โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  
โ”‚ย ย      
โ”‚ย ย      
โ”œโ”€โ”€ prestart.sh
โ”œ
โ”‚ย ย  
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ server.py
โ”œโ”€โ”€ settings
โ”‚ย ย  โ”œโ”€โ”€ devsettings.py
โ”‚ย ย  โ”œโ”€โ”€ prodsettings.py
โ”‚ย ย  โ”œโ”€โ”€ settings.py
โ”‚ย ย  โ””โ”€โ”€ testsettings.py
โ””โ”€โ”€ tests
    โ”œโ”€โ”€ __init__.py
    โ””โ”€โ”€ test.py

FastApi Structure

โ”œโ”€โ”€ app
โ”‚ย ย  โ”œโ”€โ”€ controllers
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ controller
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ controller.py
โ”‚ย ย  โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ schemas.py
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ __init__.py
โ”‚ย ย  โ”œโ”€โ”€ data
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ models.py
โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  โ”œโ”€โ”€ main.py
โ”‚ย ย  โ””โ”€โ”€ utils
โ”‚ย ย      โ”œโ”€โ”€ helpers.py
โ”‚ย ย      โ””โ”€โ”€ __init__.py
โ”œโ”€โ”€ container.sh
โ”œโ”€โ”€ core
โ”‚ย ย  โ”œโ”€โ”€ dbsetup.py
โ”‚ย ย  โ”œโ”€โ”€ extensions.py
โ”‚ย ย  โ”œโ”€โ”€ factories.py
โ”‚ย ย  โ”œโ”€โ”€ __init__.py
โ”‚ย ย  โ””โ”€โ”€ settings
โ”‚ย ย      โ”œโ”€โ”€ devsettings.py
โ”‚ย ย      โ”œโ”€โ”€ __init__.py
โ”‚ย ย      โ”œโ”€โ”€ prodsettings.py
โ”‚ย ย      โ””โ”€โ”€ settings.py
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ prestart.sh
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ req.txt
โ”œโ”€โ”€ requirements.txt
โ””โ”€โ”€ start.sh

Supported OS

Linux, MacOS

๐ŸŒฑ Contributing

Fell free to open issue and send pull request.

startapp supports Python >= 3.6

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

startapp-0.2.0.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

startapp-0.2.0.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file startapp-0.2.0.0.tar.gz.

File metadata

  • Download URL: startapp-0.2.0.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for startapp-0.2.0.0.tar.gz
Algorithm Hash digest
SHA256 5626f2eec33b3a9adc4d7ba7b1cd67b6b0e7b6af1e1dab39dbfa6e7f56333b66
MD5 9fb41b328fc9303fe9802b63f98ec570
BLAKE2b-256 df3787403a3f3950f031590b8ddf17aba88bd06cc36d2c981f7d15e22136c510

See more details on using hashes here.

File details

Details for the file startapp-0.2.0.0-py3-none-any.whl.

File metadata

  • Download URL: startapp-0.2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for startapp-0.2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b32d9c8f28588f407e6a2f4b763ff4f6cd0d72e9ff0296a87b612e44616362c
MD5 9a0fce437531405ae1f5760b666f1486
BLAKE2b-256 4c2e5a9eb09805375e3f436b02b3bec773cec8c6c0a0f76bf6dbd4a49e2177b2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page