Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Python Using UV + Flask + Docker

Welcome to the Python Using UV learning project! This simple yet powerful setup is aimed at exploring UV, the blazing-fast Python package manager, and running a basic Flask app using Docker and docker-compose. Video refrence : https://www.youtube.com/watch?v=6pttmsBSi8M

📚 About the Project

This project demonstrates how to:

  • Replace pip, virtualenv, and requirements.txt with UV.
  • Use UV to manage packages and environments.
  • Run a simple Flask app via uv run.
  • Containerize the project with Docker and manage it via docker-compose.

🛠️ Project Structure

.
├── app.py                 # Flask Application
├── uv.lock                # Locked dependencies file
├── pyproject.toml         # Project metadata and dependencies
├── Dockerfile             # Docker setup for Flask + UV
├── docker-compose.yml     # Compose file to run the app
└── README.md              # You're here!

⚡ UV Commands Used

uv init .                         # Initialize the project
uv add flask                  # Install Flask via UV
uv run app.py                     # Run the app
uv uninstall <package>           # Uninstall a package
uv sync                           # Install from pyproject.toml & uv.lock

🐳 Running with Docker

1. Build the image:

docker compose build

2. Start the container:

docker compose up

3. Access the Flask App:

Open your browser at http://localhost:5000


📌 Why UV?

  • 🔥 Ultra-fast dependency management
  • 🧼 Clean and modern replacement for pip, venv, and requirements.txt
  • 📦 Lockfile-based installations for reproducibility

🔍 References


❤️ Author

Crafted with love for learning and productivity.


About

Learning UV

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages