Feature 04 · Study guide
See the exact endpoints tamilPY generates and how to call them from Swagger or HTTP clients.
$ tpy build && tpy migrate $ tpy serve # open http://127.0.0.1:8000/docs
Model User becomes plural prefix /users:
| Method | Path | Meaning |
|---|---|---|
GET | /users/ | List records |
GET | /users/{id} | Fetch one |
POST | /users/ | Create |
PUT | /users/{id} | Update |
DELETE | /users/{id} | Delete |
POST /users/
Content-Type: application/json
{
"name": "Asha",
"email": "asha@example.com"
}
Prefer wrapping controller returns with ApiResponse when you customize handlers so every client sees the same envelope.
/user instead of /users (pluralization).required / non-nullable).