Flask-APi Starter Template With Application Context and SqlAlchemy
- Flask Application Context
- Flask Restfull2 for api endpoints
- Flask SqlAlchemy
- Flask - A Micro Web Framework
- Flask restful - Flask extension for building REST APIs
- Flask restful Swagger 2 - A Swagger spec extractor for flask-restful
- Flask CORS - A Flask extension for handling Cross Origin Resource Sharing (CORS), making cross-origin AJAX possible
- Python Dotenv - For managing app settings during development and in production
- Flask-SQLAlchemy - an extension for Flask that adds support for SQLAlchemy
This app requires python 3.x.x to run.
$ sudo apt-get install python3-pip
$ sudo pip3 install virtualenv
$ virtualenv venv
$ source venv/bin/activate
-
Edit the .env file to set environments variables like the database URI and other necessary environment variables (This file is loaded by python-dotenv when the app starts and the environment variables declared in the .env file are available for use in the app)
-
Edit the .flaskenv for the flask app configuration (The .flaskenv file is automatically imported by the flask command)
$ pip install -r requirements.txt
$ flask run
Navigate to your server address in your preferred browser.
127.0.0.1:5000
$ flask db init
$ flask db migrate
$ flask db upgrade
Want to contribute? Great!
Feel free to reachout
- Implementation of marshmallow (for object serialization/deserialization)
- Addition of JWT
MIT
Free Software, Hell Yeah!