Search Options

Results per page
Sort
Preferred Languages
Advance

Results 501 - 510 of 1,150 for rsync (0.04 sec)

  1. docs_src/body/tutorial001.py

    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    app = FastAPI()
    
    
    @app.post("/items/")
    async def create_item(item: Item):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 309 bytes
    - Viewed (0)
  2. docs_src/cookie_param_models/tutorial001_an_py310.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Cookies(BaseModel):
        session_id: str
        fatebook_tracker: str | None = None
        googall_tracker: str | None = None
    
    
    @app.get("/items/")
    async def read_items(cookies: Annotated[Cookies, Cookie()]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 343 bytes
    - Viewed (0)
  3. docs_src/query_params_str_validations/tutorial006c_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[Union[str, None], Query(min_length=3)] = ...):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 320 bytes
    - Viewed (0)
  4. docs_src/query_params_str_validations/tutorial014_an.py

    from typing import Union
    
    from fastapi import FastAPI, Query
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        hidden_query: Annotated[Union[str, None], Query(include_in_schema=False)] = None,
    ):
        if hidden_query:
            return {"hidden_query": hidden_query}
        else:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 373 bytes
    - Viewed (0)
  5. docs_src/body_nested_models/tutorial007.py

        images: Union[List[Image], None] = None
    
    
    class Offer(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        items: List[Item]
    
    
    @app.post("/offers/")
    async def create_offer(offer: Offer):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 581 bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial002.py

    
    class CommonQueryParams:
        def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: CommonQueryParams = Depends(CommonQueryParams)):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 656 bytes
    - Viewed (0)
  7. docs_src/dependencies/tutorial004_an_py39.py

    
    class CommonQueryParams:
        def __init__(self, q: Union[str, None] = None, skip: int = 0, limit: int = 100):
            self.q = q
            self.skip = skip
            self.limit = limit
    
    
    @app.get("/items/")
    async def read_items(commons: Annotated[CommonQueryParams, Depends()]):
        response = {}
        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 660 bytes
    - Viewed (0)
  8. docs_src/schema_extra_example/tutorial004_an_py39.py

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
        item: Annotated[
            Item,
            Body(
                examples=[
                    {
                        "name": "Foo",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Jul 01 16:43:29 UTC 2023
    - 936 bytes
    - Viewed (0)
  9. docs_src/extra_models/tutorial003_py310.py

        "item2": {
            "description": "Music is my aeroplane, it's my aeroplane",
            "type": "plane",
            "size": 5,
        },
    }
    
    
    @app.get("/items/{item_id}", response_model=Union[PlaneItem, CarItem])
    async def read_item(item_id: str):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 644 bytes
    - Viewed (0)
  10. docs_src/custom_response/tutorial006b.py

    from fastapi import FastAPI
    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/fastapi", response_class=RedirectResponse)
    async def redirect_fastapi():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Jul 03 19:51:28 UTC 2021
    - 220 bytes
    - Viewed (0)
Back to top