[Python] I want to add a static directory with Flask [I want to use something other than static]

Conclusion

# coding: utf-8
from flask import Flask, Blueprint

app = Flask(__name__)

#Add static directory
add_app = Blueprint("images", __name__, static_url_path="/images", static_folder="./images")
app.register_blueprint(add_app)

if __name__ == '__main__':
    app.run()

Recommended Posts

[Python] I want to add a static directory with Flask [I want to use something other than static]
I want to use Temporary Directory with Python2
I want to use a wildcard that I want to shell with Python remove
I want to use MATLAB feval with python
I want to make a game with Python
I want to write to a file with Python
I want to transition with a button in flask
I want to work with a robot in python.
I want to run a quantum computer with Python
[Python] I want to use only index when looping a list with a for statement
I want to tell people who want to import from a higher directory with Python direnv
[Python] I want to use the -h option with argparse
I want to use a virtual environment with jupyter notebook!
I want to debug with Python
I want to do a full text search with elasticsearch + python
[Python] How to get a value with a key other than value with Enum
[Introduction] I want to make a Mastodon Bot with Python! 【Beginners】
I want to use jar from python
I want to build a Python environment
I want to analyze logs with Python
I want to play with aws with python
I want to make a web application using React and Python flask
I want to create a window in Python
I want to use ceres solver from python
I don't want to use -inf with np.log
#Unresolved I want to compile gobject-introspection with Python3
I want to use ip vrf with SONiC
I want to solve APG4b with Python (Chapter 2)
I made a Mattermost bot with Python (+ Flask)
Use something other than a <br> string for the <br> dict key in Python
I just want to add scipy, but it's a messy note. Ubuntu, Python 3.
[ES Lab] I tried to develop a WEB application with Python and Flask ②
If you want to make a discord bot with python, let's use a framework
I want to embed a variable in a Python string
I want to easily implement a timeout in python
I want to iterate a Python generator many times
I want to generate a UUID quickly (memorandum) ~ Python ~
I want to handle optimization with python and cplex
I want to climb a mountain with reinforcement learning
I tried to draw a route map with Python
I want to write in Python! (2) Let's write a test
I want to randomly sample a file in Python
I want to inherit to the back with python dataclass
I want to split a character string with hiragana
[Python] I want to make a nested list a tuple
I tried to automatically generate a password with Python3
I want to AWS Lambda with Python on Mac!
I want to manually create a legend with matplotlib
[ML Ops] I want to do multi-project with Python
I want to use the R dataset in python
I want to do something in Python when I finish
I want to bind a local variable with lambda
use something other than the default profile with boto3
I want to use a python data source in Re: Dash to get query results
[Mac] I want to make a simple HTTP server that runs CGI with Python
Create a directory with python
Solution when you want to use cv_bridge with python3 (virtualenv)
I want to be able to analyze data with Python (Part 3)
I want to use R functions easily with ipython notebook
I want to specify another version of Python with pyvenv
I want to be able to analyze data with Python (Part 1)