Search Options

Results per page
Sort
Preferred Languages
Advance

Results 941 - 950 of 1,169 for def2 (0.04 sec)

  1. fastapi/openapi/docs.py

            """
        ),
    ] = {
        "dom_id": "#swagger-ui",
        "layout": "BaseLayout",
        "deepLinking": True,
        "showExtensions": True,
        "showCommonExtensions": True,
    }
    
    
    def get_swagger_ui_html(
        *,
        openapi_url: Annotated[
            str,
            Doc(
                """
                The OpenAPI URL that Swagger UI should load and use.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu May 23 22:59:02 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  2. docs_src/schema_extra_example/tutorial005_py310.py

    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
    
    
    @app.put("/items/{item_id}")
    async def update_item(
        *,
        item_id: int,
        item: Item = Body(
            openapi_examples={
                "normal": {
                    "summary": "A normal example",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 26 18:03:13 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  3. docs_src/first_steps/tutorial003.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def root():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 111 bytes
    - Viewed (0)
  4. docs_src/first_steps/tutorial002.py

    from fastapi import FastAPI
    
    my_awesome_api = FastAPI()
    
    
    @my_awesome_api.get("/")
    async def root():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 139 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_testing/test_tutorial003.py

    import pytest
    
    
    def test_main():
        with pytest.warns(DeprecationWarning):
            from docs_src.app_testing.tutorial003 import test_read_items
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 18 12:36:40 UTC 2023
    - 167 bytes
    - Viewed (0)
  6. docs_src/path_operation_advanced_configuration/tutorial004.py

        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
        - **price**: required
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 717 bytes
    - Viewed (0)
  7. docs_src/path_operation_configuration/tutorial005_py39.py

        tax: Union[float, None] = None
        tags: set[str] = set()
    
    
    @app.post(
        "/items/",
        response_model=Item,
        summary="Create an item",
        response_description="The created 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
        - **price**: required
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 736 bytes
    - Viewed (0)
  8. fastapi/concurrency.py

    from starlette.concurrency import (  # noqa
        run_until_first_complete as run_until_first_complete,
    )
    
    _T = TypeVar("_T")
    
    
    @asynccontextmanager
    async def contextmanager_in_threadpool(
        cm: ContextManager[_T],
    ) -> AsyncGenerator[_T, None]:
        # blocking __exit__ from running waiting on a free thread
        # can create race conditions/deadlocks if the context manager itself
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Dec 25 17:57:35 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  9. docs_src/bigger_applications/app/internal/admin.py

    from fastapi import APIRouter
    
    router = APIRouter()
    
    
    @router.post("/")
    async def update_admin():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Nov 29 17:32:18 UTC 2020
    - 147 bytes
    - Viewed (0)
  10. docs_src/bigger_applications/app_an/internal/admin.py

    from fastapi import APIRouter
    
    router = APIRouter()
    
    
    @router.post("/")
    async def update_admin():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 147 bytes
    - Viewed (0)
Back to top