Debian Codegraph @

docs/src/tutorial/body/code01.py

raw symbols SCIP
1 from typing import Optional
2 from ninja import Schema
3
4
5 class Item(Schema):
6 name: str
7 description: Optional[str] = None
8 price: float
9 quantity: int
10
11
12 @api.post("/items")
13 def create(request, item: Item):
14 return item