A simple flask-template for REST-API design and implementation. Please include the Template Link in your design. Template includes .gitignore
and .gitattributes
related to python and flask-api model. You can also update/change/delete LICENSE
as required. Other files are related to docker
and flake8
(code linting) is included with basic setup. The template is built on GitHub, thus .github
directory is included with issue template, and workflows directory.
NOTE: some optional usage, specifications, and helpful links are as below:
- You can add GitHub Repository Badges from Shields IO - if this is a Public Repository;
- TAB (size = 4) has been used for indentation.
.github/workflows
is added however, it is recomended that you create your own workflows either using GitHub Actions or on your own.- Basic
docker
files are added for convention, modify it as per requirement. Recomended to delete the file, if not required. - The repository uses
markdown
instead ofrich text format
, so make necessary changes to file extension/type as required. - Engine Configuration for SQLAlchemy Documentation.
Introduced in 2019, users can now create a repository from templates in GitHub. To do this, simply head over to any repository settings and enable "Template Repository" from the Options Menu. When creating a new repository from this template, you can just click on Use this template
available in this repository (refer the picture below).
Template Repository is not limited to GitHub, and you can setup your own local-file structure for the same. The following describes the usage of rsync
which is available in most linux distros, more information on rsync.
# Note the use of rsync
rsync -rh ~/source/directory /destination/directory
cookiecutter is an excellet module for creating projects from templates. The process can be done so locally (as shown below), or using command line utility cookiecutter https://github.com/ZenithClown/flask-docker-template/tree/cookiecutter
by directly accesing the repository from GitHub.
Configure the application by setting ENVIRONMENT VARIABLES
as required. Sample variables are provided in .env.bkp
, however for production grade application is is recomended that you set them at $PATH
. Start the application using python manage.py
which serves the port 0.0.0.0:5000
by default.
* Travis CI allows only 10k Credits on free-tier. The build might be old, please re-enable and check service if required.