Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 633 for id (0.18 sec)

  1. fastapi/security/open_id_connect_url.py

    Aleksei Kotenko <******@****.***> 1712026131 +0100
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  2. tests/test_generate_unique_id_function.py

    
    def test_app_path_operation_overrides_generate_unique_id():
        app = FastAPI(generate_unique_id_function=custom_generate_unique_id)
        router = APIRouter(generate_unique_id_function=custom_generate_unique_id2)
    
        @app.post(
            "/",
            response_model=List[Item],
            responses={404: {"model": List[Message]}},
            generate_unique_id_function=custom_generate_unique_id3,
        )
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Jan 13 15:10:26 GMT 2024
    - 66.7K bytes
    - Viewed (0)
  3. .github/actions/notify-translations/app/main.py

    questions_translations_category_id = "DIC_kwDOCZduT84CT5P9"
    
    all_discussions_query = """
    query Q($category_id: ID) {
      repository(name: "fastapi", owner: "tiangolo") {
        discussions(categoryId: $category_id, first: 100) {
          nodes {
            title
            id
            number
            labels(first: 10) {
              edges {
                node {
                  id
                  name
                }
              }
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  4. tests/test_application.py

                        },
                        "summary": "Get Id",
                        "operationId": "get_id_path__item_id__get",
                        "parameters": [
                            {
                                "required": True,
                                "schema": {"title": "Item Id"},
                                "name": "item_id",
                                "in": "path",
                            }
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 52.2K bytes
    - Viewed (0)
  5. docs_src/query_params/tutorial004.py

    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/users/{user_id}/items/{item_id}")
    async def read_user_item(
        user_id: int, item_id: str, q: Union[str, None] = None, short: bool = False
    ):
        item = {"item_id": item_id, "owner_id": user_id}
        if q:
            item.update({"q": q})
        if not short:
            item.update(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 468 bytes
    - Viewed (0)
  6. docs_src/additional_responses/tutorial003.py

                        "example": {"id": "bar", "value": "The bar tenders"}
                    }
                },
            },
        },
    )
    async def read_item(item_id: str):
        if item_id == "foo":
            return {"id": "foo", "value": "there goes my hero"}
        else:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 837 bytes
    - Viewed (0)
  7. tests/test_starlette_exception.py

    app = FastAPI()
    
    items = {"foo": "The Foo Wrestlers"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: str):
        if item_id not in items:
            raise HTTPException(
                status_code=404,
                detail="Item not found",
                headers={"X-Error": "Some custom header"},
            )
        return {"item": items[item_id]}
    
    
    @app.get("/http-no-body-statuscode-exception")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  8. docs_src/query_params/tutorial002_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: str, q: str | None = None):
        if q:
            return {"item_id": item_id, "q": q}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 219 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_sql_databases/test_sql_databases_middleware_py310.py

                            ),
                            "id": {"title": "Id", "type": "integer"},
                            "owner_id": {"title": "Owner Id", "type": "integer"},
                        },
                    },
                    "User": {
                        "title": "User",
                        "required": ["email", "id", "is_active"],
                        "type": "object",
                        "properties": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.5K bytes
    - Viewed (0)
  10. tests/test_put_no_body.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.put("/items/{item_id}")
    def save_item_no_body(item_id: str):
        return {"item_id": item_id}
    
    
    client = TestClient(app)
    
    
    def test_put_no_body():
        response = client.put("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item_id": "foo"}
    
    
    def test_put_no_body_with_body():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.3K bytes
    - Viewed (0)
Back to top