Giter VIP home page Giter VIP logo

python-flask-hello's Introduction

Python Flask Hello World Example

CircleCI License: MIT

This is the Static Void Academy example repository for a Hello World Python Flask web server. This is meant as a simple introduction to web servers.

This tutorial has a companion article and a YouTube video which you may find useful.

Installation / Prerequisites

You will need:

  • Python3
  • Pip3
  • Pipenv

Python3 / Pip3

Mac

For Mac users, we recommend using Homebrew to install all of your libraries and packages. Follow instructions on Homebrew's site to install brew first.

Then, install Python3

brew install python

This will install Python 3.7 and pip 3. You can automatically alias/set up your python and pip commands to point to python3 and pip3 if you'd like, but we recommend against it just so you can keep track of which versions you're using. If you're using Homebrew and your OS is up-to-date, then it should automatically install the latest versions of Python and Pip for you.

Linux

Use your distribution's package manager to install Python 3

# Debian/Ubuntu
sudo apt-get update && sudo apt-get install python3.7

# CentOS/RedHat
sudo yum update && sudo yum install centos-release-scl
sudo yum install rh-python36

# Fedora
sudo dnf install python3

Windows

Download the installer from the python website and install it from there. We recommend the Windows x86-64 web-based installer if you have decently fast Internet.

Python 3.4 and later include pip by default. If your package manager installed Python 3.3 or below, then you'll need to find separate instructions to install pip3, because this README is getting huge.

Pipenv

Next, use the pip3 package manager to install the pipenv module

sudo pip3 install pipenv

After installing pipenv, the pipenv install command can be used to install the modules listed within the Pipfile contained in the directory.

pipenv install 

Running

After installing the required dependencies, the virtual environment created by pipenv during the installation must now be activated.

pipenv shell

You can confirm that you have successfully activated the virtual environment if the name of the project appears in parentheses to the left of the command line. Once you have confirmed that the virtual environment has been activated, use the following commands to launch the Flask service.

export FLASK_APP=app.py
flask run 

python-flask-hello's People

Contributors

mvxt avatar rcuza avatar zellefrow 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.