Giter Site home page Giter Site logo

garyjyao / flask-app-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jecklgamis/flask-app-example

0.0 0.0 0.0 38 KB

An example Flask app using Python 3 and Docker.

License: Apache License 2.0

Shell 12.89% Python 44.85% Makefile 13.61% Smarty 21.66% Dockerfile 6.99%

flask-app-example's Introduction

flask-app-example

Build

An example Flask app using Python 3 and Docker.

Docker : docker run -p 8080:8080 -it garyjyao/flask-app-example:main

What's in the box?

  • Ubuntu Linux based Docker image
  • SSL/TLS listener
  • Modular route handlers using Flask Blueprints
  • Gunicorn WSGI server
  • Flask tests (under tests directory) using pytest and a smoke-tests.py for basic endpoint testing

Preparing Your Environment

Install Python dependencies:

make install-deps

Building

To build the app:

make all 

This does a couple of things:

  • It generates self-signed SSL certificates (server.key and server.crt)
  • It generates server_info.json that is served by the /server_info endpoint
  • It runs tests using pytest
  • It generates a Docker image

Explore the Makefile for details.

Running

To run the app in Docker:

make run

To run the app directly without using Docker:

make run-app-dev-mode
make run-app-dev-mode-ssl

Testing The EndPoints

make smoke-tests

Contributing

Please raise issue or pull request. Thanks for contributing!

Have fun!

flask-app-example's People

Contributors

jecklgamis avatar garyjyao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.