https://github.com/amoghmadan/python-flask-rest-starter
Kick-starter to your REST application.
https://github.com/amoghmadan/python-flask-rest-starter
docker flask marshmallow python rest-api sqlalchemy
Last synced: about 1 month ago
JSON representation
Kick-starter to your REST application.
- Host: GitHub
- URL: https://github.com/amoghmadan/python-flask-rest-starter
- Owner: amoghmadan
- License: mit
- Created: 2020-06-21T08:22:47.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-04-23T14:38:22.000Z (about 2 months ago)
- Last Synced: 2025-05-07T05:06:16.605Z (about 1 month ago)
- Topics: docker, flask, marshmallow, python, rest-api, sqlalchemy
- Language: Python
- Homepage: https://github.com/amoghmadan/Python-Flask-REST-Starter
- Size: 41 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Flask REST Starter
Kick-starter to your REST application.
## How to set up environment variables?
- Fill the .env file with the following values, they might need adjustment.
```dotenv
DEBUG= # Dev: True
SECRET_KEY= # Dev: a1b2c3d4e5f6g7h8i9j10k11l12m13n14o15p16q
SQLALCHEMY_DATABASE_URI= # Dev: sqlite:///db.sqlite3
```## How to set up project for development?
- Create a virtual environment: -
```bash
python -m venv venv
```
- Activate: -
- Windows: `venv\Scripts\activate`
- Unix-like: `. venv\bin\activate`
- Install dependencies: -
```bash
pip install . -e '.[all]'
```
- Set environment variable: -
- Windows: `SET FLASK_APP=app.wsgi`
- Unix-like: `export FLASK_APP=app.wsgi`
- Create a new user: -
```bash
flask manage createsuperuser
```
- Run: -
```bash
flask run --debug
```## How to set up project for deployment?
- Create a virtual environment: -
```bash
python -m venv venv
```
- Activate: -
- Windows: `venv\Scripts\activate`
- Unix-like: `. venv\bin\activate`
- Install dependencies: -
```bash
pip install -e '.[deployment]'
```
- Set environment variable: -
- Windows: `SET FLASK_APP=app.wsgi`
- Unix-like: `export FLASK_APP=app.wsgi`
- Create a new user: -
```bash
flask manage createsuperuser
```
- Run: -
```bash
gunicorn -b 0.0.0.0:8000 app.wsgi:application -w 4 -t 9
```