Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Simple FastAPI App

A minimal FastAPI application with a hello endpoint and basic in-memory CRUD for items.

Requirements

  • Python 3.9+

Setup

pip install -r requirements.txt

Run

uvicorn main:app --reload

The app runs at http://127.0.0.1:8000. Interactive API docs are at http://127.0.0.1:8000/docs.

Endpoints

Method Path Description
GET / Hello message
GET /hello/{name} Greet a name
GET /items List all items
GET /items/{item_id} Get one item
POST /items Create an item
PUT /items/{item_id} Update an item
DELETE /items/{item_id} Delete an item

Example

curl -X POST http://127.0.0.1:8000/items \
  -H "Content-Type: application/json" \
  -d '{"name": "Notebook", "price": 4.99, "in_stock": true}'

Notes

Items are stored in memory, so data is lost when the server restarts.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages