Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 462 for Portal (0.05 sec)

  1. docs_src/response_model/tutorial001_py310.py

    @app.post("/items/", response_model=Item)
    async def create_item(item: Item) -> Any:
        return item
    
    
    @app.get("/items/", response_model=list[Item])
    async def read_items() -> Any:
        return [
            {"name": "Portal Gun", "price": 42.0},
            {"name": "Plumbus", "price": 32.0},
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Jan 07 13:45:48 UTC 2023
    - 537 bytes
    - Viewed (0)
  2. docs_src/separate_openapi_schemas/tutorial002_py39.py

    
    @app.post("/items/")
    def create_item(item: Item):
        return item
    
    
    @app.get("/items/")
    def read_items() -> list[Item]:
        return [
            Item(
                name="Portal Gun",
                description="Device to travel through the multi-rick-verse",
            ),
            Item(name="Plumbus"),
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Aug 25 19:10:22 UTC 2023
    - 518 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_behind_a_proxy/test_tutorial001_01.py

    
    def test_no_redirect() -> None:
        response = client.get("/items/")
        assert response.status_code == 200
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 544 bytes
    - Viewed (0)
  4. tests/test_openapi_separate_input_output_schemas.py

        @app.post("/items-list/")
        def create_item_list(item: list[Item]):
            return item
    
        @app.get("/items/")
        def read_items() -> list[Item]:
            return [
                Item(
                    name="Portal Gun",
                    description="Device to travel through the multi-rick-verse",
                    sub=SubItem(subname="subname"),
                ),
                Item(name="Plumbus"),
            ]
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 26.6K bytes
    - Viewed (0)
  5. docs_src/generate_clients/tutorial002_py39.py

        return {"message": "Item received"}
    
    
    @app.get("/items/", response_model=list[Item], tags=["items"])
    async def get_items():
        return [
            {"name": "Plumbus", "price": 3},
            {"name": "Portal Gun", "price": 9001},
        ]
    
    
    @app.post("/users/", response_model=ResponseMessage, tags=["users"])
    async def create_user(user: User):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Mar 04 22:02:18 UTC 2022
    - 730 bytes
    - Viewed (0)
  6. docs/en/docs/reference/status.md

    ## Example
    
    ```python
    from fastapi import FastAPI, status
    
    app = FastAPI()
    
    
    @app.get("/items/", status_code=status.HTTP_418_IM_A_TEAPOT)
    def read_items():
        return [{"name": "Plumbus"}, {"name": "Portal Gun"}]
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 871 bytes
    - Viewed (0)
  7. tests/test_tutorial/test_generate_clients/test_tutorial001.py

    def test_get_items(client: TestClient):
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {"name": "Plumbus", "price": 3},
            {"name": "Portal Gun", "price": 9001},
        ]
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py

    
    def test_read_items(client: TestClient) -> None:
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {
                "name": "Portal Gun",
                "description": "Device to travel through the multi-rick-verse",
            },
            {"name": "Plumbus", "description": None},
        ]
    
    
    def test_openapi_schema(client: TestClient) -> None:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 5K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/request-form-models.md

    Если клиент попробует отправить дополнительные данные, то в ответ он получит **ошибку**.
    
    Например, если клиент попытается отправить поля формы:
    
    * `username`: `Rick`
    * `password`: `Portal Gun`
    * `extra`: `Mr. Poopybutthole`
    
    То в ответ он получит **ошибку**, сообщающую ему, что поле `extra` не разрешено:
    
    ```json
    {
        "detail": [
            {
                "type": "extra_forbidden",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:24:39 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  10. docs_src/dependencies/tutorial012_an_py39.py

        return x_key
    
    
    app = FastAPI(dependencies=[Depends(verify_token), Depends(verify_key)])
    
    
    @app.get("/items/")
    async def read_items():
        return [{"item": "Portal Gun"}, {"item": "Plumbus"}]
    
    
    @app.get("/users/")
    async def read_users():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 746 bytes
    - Viewed (0)
Back to top