Skip to content

astral-sh/uv-flask-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uv-flask-example

An example Flask project using uv.

Getting started

Run the server:

$ uv run flask --app hello run
 * Serving Flask app 'hello'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:5000
Press CTRL+C to quit

Then check out the hello world page in your browser.

Creating a new Flask project

First, create a new project with uv:

$ uv init uv-flask-example
$ cd uv-flask-example

Add a dependency on flask:

$ uv add flask

Then, edit hello.py to match Flask's minimal application example.

from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello_world():
    return "<p>Hello, World!</p>"

About

An example Flask project using uv

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages