Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 65 for Columbus (0.18 sec)

  1. tests/test_tutorial/test_dependencies/test_tutorial008d_an.py

        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Item not found, there's only a plumbus here"}
    
    
    def test_get(client: TestClient):
        response = client.get("/items/plumbus")
        assert response.status_code == 200, response.text
        assert response.json() == "plumbus"
    
    
    def test_internal_error(client: TestClient):
        from docs_src.dependencies.tutorial008d_an import InternalError
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_bigger_applications/test_main_an.py

                    },
                ]
            }
        )
    
    
    def test_items_plumbus_token_jessica(client: TestClient):
        response = client.get(
            "/items/plumbus?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 200
        assert response.json() == {"name": "Plumbus", "item_id": "plumbus"}
    
    
    def test_items_bar_token_jessica(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.6K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_bigger_applications/test_main_an_py39.py

                ]
            }
        )
    
    
    @needs_py39
    def test_items_plumbus_token_jessica(client: TestClient):
        response = client.get(
            "/items/plumbus?token=jessica", headers={"X-Token": "fake-super-secret-token"}
        )
        assert response.status_code == 200
        assert response.json() == {"name": "Plumbus", "item_id": "plumbus"}
    
    
    @needs_py39
    def test_items_bar_token_jessica(client: TestClient):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  4. docs_src/response_model/tutorial001_01.py

    @app.post("/items/")
    async def create_item(item: Item) -> Item:
        return item
    
    
    @app.get("/items/")
    async def read_items() -> List[Item]:
        return [
            Item(name="Portal Gun", price=42.0),
            Item(name="Plumbus", price=32.0),
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jan 07 13:45:48 GMT 2023
    - 513 bytes
    - Viewed (0)
  5. docs_src/generate_clients/tutorial001.py

    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},
            {"name": "Portal Gun", "price": 9001},
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 04 22:02:18 GMT 2022
    - 519 bytes
    - Viewed (0)
  6. docs_src/response_model/tutorial001_py39.py

    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},
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Jan 07 13:45:48 GMT 2023
    - 556 bytes
    - Viewed (0)
  7. docs_src/generate_clients/tutorial002.py

    async def create_item(item: Item):
        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):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 04 22:02:18 GMT 2022
    - 755 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dependencies/test_tutorial012_an.py

                "X-Key": "fake-super-secret-key",
            },
        )
        assert response.status_code == 200, response.text
        assert response.json() == [{"item": "Portal Gun"}, {"item": "Plumbus"}]
    
    
    def test_get_valid_headers_users():
        response = client.get(
            "/users/",
            headers={
                "X-Token": "fake-super-secret-token",
                "X-Key": "fake-super-secret-key",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 8.4K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/generate-clients.md

    * `ItemsService`
    * `UsersService`
    
    ### Client Method Names
    
    Right now the generated method names like `createItemItemsPost` don't look very clean:
    
    ```TypeScript
    ItemsService.createItemItemsPost({name: "Plumbus", price: 5})
    ```
    
    ...that's because the client generator uses the OpenAPI internal **operation ID** for each *path operation*.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_dependencies/test_tutorial008d.py

        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Item not found, there's only a plumbus here"}
    
    
    def test_get(client: TestClient):
        response = client.get("/items/plumbus")
        assert response.status_code == 200, response.text
        assert response.json() == "plumbus"
    
    
    def test_internal_error(client: TestClient):
        from docs_src.dependencies.tutorial008d import InternalError
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.2K bytes
    - Viewed (0)
Back to top