Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ericdaat/flask-template
Template for a Python Flask web application along with sqlalchemy, docker, circle-ci and sphinx.
https://github.com/ericdaat/flask-template
docker docker-compose flask flask-application python python3 template web
Last synced: 3 months ago
JSON representation
Template for a Python Flask web application along with sqlalchemy, docker, circle-ci and sphinx.
- Host: GitHub
- URL: https://github.com/ericdaat/flask-template
- Owner: ericdaat
- License: mit
- Created: 2018-12-21T07:22:19.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T01:29:41.000Z (almost 2 years ago)
- Last Synced: 2024-05-28T04:10:34.251Z (6 months ago)
- Topics: docker, docker-compose, flask, flask-application, python, python3, template, web
- Language: Python
- Homepage:
- Size: 41 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - ericdaat/flask-template - Template for a Python Flask web application along with sqlalchemy, docker, circle-ci and sphinx. (Python)
README
# Flask Web Application template
[![Documentation Status](https://readthedocs.org/projects/flask-template/badge/?version=latest)](https://flask-template.readthedocs.io/en/latest/?badge=latest)
[![CircleCI](https://circleci.com/gh/ericdaat/flask-template.svg?style=svg)](https://circleci.com/gh/ericdaat/flask-template)This is a template for a basic Flask web application that responds
an HTML page on `localhost:8080`.This template comes with support for:
- [SQLlite database](https://www.sqlite.org/index.html)
- [Sphinx documentation](http://www.sphinx-doc.org/en/master/)
- [Twitter Bootstrap](https://getbootstrap.com/)
- [Font Awesome](https://fontawesome.com/)
- [Docker](https://www.docker.com/) and [docker-compose](https://docs.docker.com/compose/)Don't hesitate to contribute!
## Install
Create a virtual environment and install the requirements.
``` bash
make venv/bin/activate
```Init the database by creating all tables.
``` bash
export DATABASE_URL=sqlite:///../db.sqlite3
export FLASK_APP="application.app"
flask init-db
```## Run
Run the application debug mode.
``` bash
FLASK_DEBUG=True flask run
```If you wish to use Docker for deploying the app, run the following:
``` bash
docker-compose up -d
```## Docs
Automatically create and build the code documentation using Sphinx.
You can use [Read the Docs](https://readthedocs.org/) to build and host the documentation,
like I did [here](https://flask-template.readthedocs.io/en/latest/).``` bash
make docs
```## Clone the template to another directory
``` bash
./install.sh /path/to/your/dir
```