- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 578 for name (0.14 sec)
-
docs_src/settings/tutorial001_pv1.py
from fastapi import FastAPI from pydantic import BaseSettings class Settings(BaseSettings): app_name: str = "Awesome API" admin_email: str items_per_user: int = 50 settings = Settings() app = FastAPI() @app.get("/info") async def info(): return { "app_name": settings.app_name, "admin_email": settings.admin_email, "items_per_user": settings.items_per_user,
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 410 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial007.py
app = FastAPI() class Image(BaseModel): url: HttpUrl name: str class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: Set[str] = set() images: Union[List[Image], None] = None class Offer(BaseModel): name: str description: Union[str, None] = None price: float items: List[Item]
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 581 bytes - Viewed (0) -
docs_src/generate_clients/tutorial001_py39.py
app = FastAPI() class Item(BaseModel): name: str price: float class ResponseMessage(BaseModel): message: str @app.post("/items/", response_model=ResponseMessage) async def create_item(item: Item): return {"message": "item received"} @app.get("/items/", response_model=list[Item]) async def get_items(): return [ {"name": "Plumbus", "price": 3},
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Mar 04 22:02:18 GMT 2022 - 494 bytes - Viewed (0) -
docs_src/app_testing/tutorial003.py
async def startup_event(): items["foo"] = {"name": "Fighters"} items["bar"] = {"name": "Tenders"} @app.get("/items/{item_id}") async def read_items(item_id: str): return items[item_id] def test_read_items(): with TestClient(app) as client: response = client.get("/items/foo") assert response.status_code == 200
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 528 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial004_py39.py
app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: set[str] = set() @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Create an item with all the information: - **name**: each item must have a name - **description**: a long description
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 676 bytes - Viewed (0) -
docs_src/dependencies/tutorial002_an_py310.py
from typing import Annotated from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/")
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 664 bytes - Viewed (0) -
docs_src/dependencies/tutorial004_an_py310.py
from typing import Annotated from fastapi import Depends, FastAPI app = FastAPI() fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/")
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 647 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial005_py39.py
""" Create an item with all the information: - **name**: each item must have a name - **description**: a long description - **price**: required - **tax**: if the item doesn't have tax, you can omit this - **tags**: a set of unique tag strings for this item """
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 736 bytes - Viewed (0) -
docs_src/metadata/tutorial001.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 805 bytes - Viewed (0) -
tests/test_tutorial/test_query_params/test_tutorial006.py
Python - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 6.1K bytes - Viewed (0)