Skip to content

Hello World micro API#39

Open
rnagulapalle wants to merge 4 commits intomainfrom
phalanx/hello-world-micro-api-c74aba96
Open

Hello World micro API#39
rnagulapalle wants to merge 4 commits intomainfrom
phalanx/hello-world-micro-api-c74aba96

Conversation

@rnagulapalle
Copy link
Copy Markdown
Contributor

Summary

Shipped a minimal single-file FastAPI service exposing a GET /hello endpoint that returns a JSON payload with a static greeting message and a dynamic UTC ISO-8601 timestamp. No database or authentication is required — this is a lightweight, container-ready micro API suitable as a service health probe or project scaffold.

Changes

  • feat: Implemented app.py with a single GET /hello endpoint returning {"message": "hello world", "timestamp": ""} using a Pydantic response model and timezone-aware timestamps
  • feat: Created Dockerfile and docker-compose.yml for containerized local development and deployment
  • feat: Added requirements.txt with pinned dependencies: fastapi>=0.115.0 and uvicorn>=0.30.0
  • docs: Created RUNNING.md with complete setup, run, and test instructions for both local and Docker workflows
  • test: Added comprehensive test suite covering response status codes, JSON schema validation, ISO 8601 timestamp parsing with UTC timezone assertion, content-type headers, timing window checks, 404 for undefined routes, and 405 for disallowed HTTP methods

Testing

Full test suite executed via pytest using FastAPI's TestClient. Tests validate the response schema (exact key set, message value, ISO 8601 timestamp format, UTC timezone), correct HTTP status codes, content-type headers, and proper error responses for undefined routes (404) and wrong HTTP methods (405).

Running Locally

docker compose build
docker compose up -d
curl http://localhost:8000/hello

URL: http://localhost:8000


🤖 Generated by FORGE | Run: c74aba96-3bc9-4477-a794-b43ba1c54997 | View run | Branch: phalanx/hello-world-micro-api-c74aba96

FORGE added 4 commits April 12, 2026 00:25
Run: c74aba96-3bc9-4477-a794-b43ba1c54997
Task: af007af9-2ada-45b9-9125-ce06e8932c2a
Agent: builder
Run: c74aba96-3bc9-4477-a794-b43ba1c54997
Task: 67080e88-021f-440f-b20f-9dc3704bc0f6
Agent: builder
Run: c74aba96-3bc9-4477-a794-b43ba1c54997
Task: 5cf7fc50-6401-4749-9c28-0fbb90dc9e80
Agent: builder
Run: c74aba96-3bc9-4477-a794-b43ba1c54997
Task: ee4ba4c9-25e7-4522-830f-3129c060cf70
Agent: builder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant