Skip to content

Conversation

@devops-nq
Copy link

@devops-nq devops-nq commented Dec 20, 2025

This PR implements the complete server inventory challenge: a FastAPI CRUD API backed by PostgreSQL using raw SQL, a Typer CLI for interacting with the API, a pytest suite, and a Docker Compose stack. It also includes clear run instructions and API/CLI specs in API.md.

What’s included

FastAPI CRUD endpoints for servers with validation (unique hostname, IP format, state enum).
PostgreSQL schema and initialization via 001_init.sql.
Raw SQL data access via psycopg and connection pooling.
Typer CLI with readable help and table output.
Pytest suite covering create/read/update/delete, validation, uniqueness, and list filtering.
Docker Compose stack for API + DB and a Dockerfile for the API service.
Updated API.md with run steps, endpoint spec, and CLI usage.
Validation

pytest (5 passing)
API health check via /health
CLI create/list/get/update/delete verified
Notes

CLI help output stabilized for Click/Typer compatibility.

I've tried to keep it simple and built for purpose.

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.

2 participants