A simple Flask API that echoes back the value of the q
query parameter.
- Create a virtual environment:
python -m venv .venv
source .venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
Send a GET request to /echo with a q parameter:
curl "http://127.0.0.1:5000/echo?q=hello"
{
"message": "hello"
}