A REST API for cataloguing and managing API resources β built with FastAPI and SQLite. Full CRUD, search, pagination, and auto-generated interactive docs.
π API on Render Β· Interactive Docs
β οΈ Free tier β may take 30β60 seconds to wake up on first request.
- Full CRUD β Create, Read, Update, Delete API resources
- Search β filter by name, description, or URL (case-insensitive)
- Pagination β
skip&limitquery params - Auto docs β Swagger UI at
/docs, ReDoc at/redoc - Input validation β Pydantic v2 models, duplicate URL detection
- Zero-config DB β SQLite, no external database server needed
| Technology | Purpose |
|---|---|
| Python 3.10+ | Core language |
| FastAPI | Web framework |
| SQLAlchemy | ORM / database layer |
| SQLite | Embedded database |
| Pydantic v2 | Request/response validation |
| Uvicorn | ASGI server |
| Render | Cloud deployment |
# Clone the repo
git clone https://github.com/ByteMe-UK/api-library-manager.git
cd api-library-manager
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run the API
uvicorn app.main:app --reloadOpen http://localhost:8000/docs for the interactive Swagger UI.
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Welcome + endpoint index |
GET |
/api/ |
List all resources (supports search + pagination) |
POST |
/api/ |
Create a new resource |
GET |
/api/{id} |
Get a resource by ID |
PUT |
/api/{id} |
Update a resource (partial update supported) |
DELETE |
/api/{id} |
Delete a resource |
| Param | Type | Default | Description |
|---|---|---|---|
search |
string | β | Filter by name, description, or URL |
skip |
int | 0 | Records to skip (pagination offset) |
limit |
int | 20 | Max records returned (capped at 100) |
# Create a resource
curl -X POST http://localhost:8000/api/ \
-H "Content-Type: application/json" \
-d '{"name": "OpenWeather API", "description": "Free weather data", "url": "https://api.openweathermap.org"}'
# List all
curl http://localhost:8000/api/
# Search
curl "http://localhost:8000/api/?search=weather"
# Paginate
curl "http://localhost:8000/api/?skip=0&limit=5"
# Update
curl -X PUT http://localhost:8000/api/1 \
-H "Content-Type: application/json" \
-d '{"description": "Updated description"}'
# Delete
curl -X DELETE http://localhost:8000/api/1{
"id": 1,
"name": "OpenWeather API",
"description": "Free weather data",
"url": "https://api.openweathermap.org"
}api-library-manager/
βββ app/
β βββ main.py β FastAPI app, all endpoints
β βββ database.py β SQLAlchemy engine, session, APIResource model
β βββ schemas.py β Pydantic v2 request/response schemas
β βββ models.py β (reserved for future model expansion)
βββ Procfile β Render deployment config
βββ requirements.txt β Python dependencies
βββ LICENSE
βββ README.md
- Push this repo to GitHub
- Go to render.com β New Web Service
- Connect your GitHub repo
- Set Start Command:
uvicorn app.main:app --host 0.0.0.0 --port $PORT - Click Deploy
The Procfile already has the correct start command.
MIT License β see LICENSE for details.
Part of the ByteMe-UK portfolio collection.
hello
