Skip to content

blossom-examples/python-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Flask Tutorial Deploy on Blossom

Blossom Badge

A ready-to-deploy Python Flask app to get you started quickly on Blossom.

Quick Start

# Create and activate virtual environment
python -m venv venv
source venv/bin/activate  # or `venv/Scripts/activate` on Windows
source venv/bin/activate.fish  # fish shell

# Install dependencies
pip install -r requirements.txt

# Run the app
python app.py

Visit http://localhost:5000 in your browser to see the demo application.

Additional Information

Environment Variables

  • PORT: Change the port (default: 5000)
  • FLASK_DEBUG: Enable debug mode (set to 1)

API Endpoints

# Get a greeting
curl http://localhost:5000/api/hello?name=John

# Echo a message
curl -X POST -H "Content-Type: application/json" \
     -d '{"message":"Hello"}' http://localhost:5000/api/echo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published