Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dreamsparkx/flask-boilerplate


https://github.com/dreamsparkx/flask-boilerplate

Last synced: 9 days ago
JSON representation

Awesome Lists containing this project

README

        

Flaskr
======

![main.yml workflow](https://github.com/dreamsparkx/flask-boilerplate/actions/workflows/python-app.yml/badge.svg)

Install
-------

**Be sure to use the same version of the code as the version of the docs
you're reading.** You probably want the latest tagged version, but the
default Git version is the main branch. ::

# clone the repository
$ git clone https://github.com/dreamsparkx/flask-boilerplate
$ cd flask-boilerplate

Create a virtualenv and activate it::

$ python3 -m venv venv
$ . venv/bin/activate

Or on Windows cmd::

$ py -3 -m venv venv
$ venv\Scripts\activate.bat

Install Flaskr::

$ pip install -e .

Or if you are using the main branch, install Flask from source before
installing Flaskr::

$ pip install -e ../..
$ pip install -e .

Run
---

.. code-block:: text

$ flask --app flaskr init-db
$ flask --app flaskr run --debug

Open http://127.0.0.1:5000 in a browser.

Test
----

::

$ pip install '.[test]'
$ pytest

Run with coverage report::

$ coverage run -m pytest
$ coverage report
$ coverage html # open htmlcov/index.html in a browser