Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 83 for plumbus (0.12 sec)

  1. 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),
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Jan 07 13:45:48 UTC 2023
    - 513 bytes
    - Viewed (0)
  2. docs_src/generate_clients/tutorial001_py39.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},
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 04 22:02:18 UTC 2022
    - 494 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_path_operation_configurations/test_tutorial002b.py

    client = TestClient(app)
    
    
    def test_get_items():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == ["Portal gun", "Plumbus"]
    
    
    def test_get_users():
        response = client.get("/users/")
        assert response.status_code == 200, response.text
        assert response.json() == ["Rick", "Morty"]
    
    
    def test_openapi_schema():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  4. docs_src/separate_openapi_schemas/tutorial001_py39.py

    @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: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Aug 25 19:10:22 UTC 2023
    - 483 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},
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 04 22:02:18 UTC 2022
    - 519 bytes
    - Viewed (0)
  6. docs_src/path_operation_configuration/tutorial002b.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    class Tags(Enum):
        items = "items"
        users = "users"
    
    
    @app.get("/items/", tags=[Tags.items])
    async def get_items():
        return ["Portal gun", "Plumbus"]
    
    
    @app.get("/users/", tags=[Tags.users])
    async def read_users():
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sun Jan 23 17:43:04 UTC 2022
    - 323 bytes
    - Viewed (0)
  7. docs_src/response_model/tutorial001_py310.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},
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Jan 07 13:45:48 UTC 2023
    - 537 bytes
    - Viewed (0)
  8. docs_src/dependencies/tutorial012_an.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: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 756 bytes
    - Viewed (0)
  9. docs_src/response_model/tutorial001.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},
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat Jan 07 13:45:48 UTC 2023
    - 562 bytes
    - Viewed (0)
  10. docs_src/separate_openapi_schemas/tutorial001_py310.py

    @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: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Aug 25 19:10:22 UTC 2023
    - 451 bytes
    - Viewed (0)
Back to top