Skip to content

llacoste/python_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Example

Simple Python Flask app for the sake of demonstrating CI/CD with Jenkins. Shamelessly stolen from:

The basic blog app built in the Flask tutorial_.

.. _tutorial: https://flask.palletsprojects.com/tutorial/

Docker

Build

docker build -t python_example:latest .

Run

Interactive

docker run -it python_example:latest /bin/bash

Interactive with code mounted (for development)

docker run -it -v $(pwd):/opt/app python_example:latest /bin/bash

Non Interactive

docker run python_example:latest 

Local

Install

Install Flaskr

pip install -e .

Run

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

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

Test

Docker

docker run python_example:latest pytest

Local

pytest

Run with coverage report::

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

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors