Easy web app with Python + Flask + Heroku

Greetings

I will spell various notes from the perspective of Ruby.

pip, pip3

Something like gem,

The guy that comes with python3 is pip3

virtualenv

Something like Bundler

$ pip3 install virtualenv

Create an isolated environment with a command like bundle init

$ virtualenv venv

Type a command like bundle exec

$ source venv/bin/activate

Flask

Something like Sinatra

$ pip install flask

Gunicorn

Web server, something like unicorn

$ pip install gunicorn

Start making an app

Let's say it's named test_app.

$ mkdir test_app; cd test_app


$ touch main.py Procfile

main.py


import os
from flask import Flask

app = Flask(__name__)

@app.route('/')
def index():
    return 'Hello World!'

Procfile


web: gunicorn main:app --log-file=-

Start-up

$ foreman start

Easy ...

Make something like Gemfile.lock

$ pip freeze > requirements.txt

git

$ git init

$ echo 'venv\n*.pyc' > .gitignore

heroku

$ heroku create test-app

$ git push heroku master

$ heroku open

later

http://flask.pocoo.org/docs/0.10/

Recommended Posts

Easy web app with Python + Flask + Heroku
Easy deep learning web app with NNC and Python + Flask
Vienna with Python + Flask web app on Jenkins
Web application with Python + Flask ② ③
Web application with Python + Flask ④
Easy machine learning with scikit-learn and flask ✕ Web app
Run the app with Flask + Heroku
How to deploy a web app made with Flask to Heroku
(Failure) Deploy a web app made with Flask on heroku
Create a simple web app with flask
Getting Started with Heroku, Deploying Flask App
Easy web scraping with Python and Ruby
Programming with Python Flask
How to upload with Heroku, Flask, Python, Git (4)
Launch a web server with Python and Flask
Web scraping with python + JupyterLab
[Co-occurrence analysis] Easy co-occurrence analysis with Python! [Python]
Touch Flask + run with Heroku
How to upload with Heroku, Flask, Python, Git (Part 3)
Web application development with Flask
Easy folder synchronization with Python
Parse and visualize JSON (Web application ⑤ with Python + Flask)
Easy web scraping with Scrapy
Web API with Python + Falcon
How to upload with Heroku, Flask, Python, Git (Part 1)
How to upload with Heroku, Flask, Python, Git (Part 2)
Easy Python compilation with NUITKA-Utilities
Easy HTTP server with Python
Web scraping beginner with python
Streamline web search with python
Deploy a web app created with Streamlit to Heroku
Sample to put Python Flask web app on Azure App Service (Web App)
Create Heroku, Flask, Python, Nyanko bulletin boards with "csv files"
SNS Python basics made with Flask
[Python] Easy parallel processing with Joblib
Getting Started with Python Web Applications
Web scraping with Python First step
I tried web scraping with python.
Monitor Python web apps with Prometheus
[Python] Use Basic/Digest authentication with Flask
Get web screen capture with python
Next, use Python (Flask) for Heroku!
Easy GUI app with Tkinter Text
Creating a simple app with flask
Easy Python + OpenCV programming with Canopy
Deploy Flask app on heroku (bitterly)
Bayesian optimization very easy with Python
Deploy the Flask app on Heroku
Easy data visualization with Python seaborn.
Deploy the Flask app on heroku
Easy parallel execution with python subprocess
Easy modeling with Blender and Python
Application development with Docker + Python + Flask
The first artificial intelligence. Challenge web output with python. ~ Flask introduction
Web application created with Python + Flask (using VScode) # 1-Virtual environment construction-
Python x Flask x PyTorch Easy construction of number recognition web application
I made a Nyanko tweet form with Python, Flask and Heroku
Azure table storage with PTVS Flask app
Easy keyword extraction with TermExtract for Python
[Python] Super easy test with assert statement
WEB scraping with Python (for personal notes)