From 5d44d2b35e075cf43082a6f1b09f7921df5e75b9 Mon Sep 17 00:00:00 2001 From: Zopu Agent Date: Sun, 26 Jul 2026 00:40:08 +0530 Subject: [PATCH] feat: complete issue #1 --- .gitignore | 3 +++ README.md | 43 ++++++++++++++++++++++++++++++++++++++++++- requirements.txt | 1 + server.py | 23 +++++++++++++++++++++++ 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 requirements.txt create mode 100644 server.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..300eb37 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.pyc +__pycache__/ +venv/ diff --git a/README.md b/README.md index 5acef1a..2593074 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,44 @@ # hello-world -An empty starter repository for testing Zopu's issue-to-pull-request workflow. +--- + +## Hello World API + +This repository contains a minimal **Python** Flask application exposing a single endpoint: + +``` +GET /hello +``` + +It responds with a short JSON greeting. + +### Quick start + +```bash +# install dependencies +pip install -r requirements.txt + +# run the server +python server.py +``` + +The service will be available at . + +### Expected output + +```bash +$ curl -s http://localhost:5000/hello +{"message":"Hello, world!"} +``` + +--- + +> **Note**: No external configuration is required. + +--- + +--- + +## Project overview + +This is a simple skeleton used for testing the Zopu issue‑to‑PR workflow. If you wish to report an issue or contribute, feel free to open a pull request. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7e10602 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +flask diff --git a/server.py b/server.py new file mode 100644 index 0000000..c294fa5 --- /dev/null +++ b/server.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +""" +Simple Hello World API. + +Run with: + python3 server.py + +It will start a Flask server listening on http://127.0.0.1:5000/hello + +The endpoint returns JSON: + {"message": "Hello, world!"} +""" + +from flask import Flask, jsonify + +app = Flask(__name__) + +@app.route("/hello", methods=["GET"]) +def hello(): + return jsonify(message="Hello, world!") + +if __name__ == "__main__": + app.run(host="0.0.0.0", port=5000, debug=True)