Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 1,800 for App (0.01 sec)

  1. tests/test_request_params/test_body/test_required_str.py

    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/required-str", operation_id="required_str")
    async def read_required_str(p: Annotated[str, Body(embed=True)]):
        return {"p": p}
    
    
    class BodyModelRequiredStr(BaseModel):
        p: str
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 11K bytes
    - Viewed (0)
  2. tests/test_request_params/test_file/test_optional_list.py

    from .utils import get_body_model_name
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.post("/optional-list-bytes")
    async def read_optional_list_bytes(p: Annotated[Optional[list[bytes]], File()] = None):
        return {"file_size": [len(file) for file in p] if p else None}
    
    
    @app.post("/optional-list-uploadfile")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  3. docs_src/request_files/tutorial002_py39.py

    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(files: list[bytes] = File()):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(files: list[UploadFile]):
        return {"filenames": [file.filename for file in files]}
    
    
    @app.get("/")
    async def main():
        content = """
    <body>
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 786 bytes
    - Viewed (0)
  4. tests/test_request_params/test_header/test_required_str.py

    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.get("/required-str")
    async def read_required_str(p: Annotated[str, Header()]):
        return {"p": p}
    
    
    class HeaderModelRequiredStr(BaseModel):
        p: str
    
    
    @app.get("/model-required-str")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10K bytes
    - Viewed (0)
  5. tests/test_validate_response_dataclass.py

    from fastapi.testclient import TestClient
    from pydantic.dataclasses import dataclass
    
    app = FastAPI()
    
    
    @dataclass
    class Item:
        name: str
        price: Optional[float] = None
        owner_ids: Optional[list[int]] = None
    
    
    @app.get("/items/invalid", response_model=Item)
    def get_invalid():
        return {"name": "invalid", "price": "foo"}
    
    
    @app.get("/items/innerinvalid", response_model=Item)
    def get_innerinvalid():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/app/web/api/admin/dataconfig/ApiAdminDataconfigAction.java

    import org.codelibs.fess.Constants;
    import org.codelibs.fess.app.pager.DataConfigPager;
    import org.codelibs.fess.app.service.DataConfigService;
    import org.codelibs.fess.app.web.CrudMode;
    import org.codelibs.fess.app.web.api.ApiResult;
    import org.codelibs.fess.app.web.api.ApiResult.ApiConfigResponse;
    import org.codelibs.fess.app.web.api.ApiResult.ApiResponse;
    import org.codelibs.fess.app.web.api.ApiResult.ApiUpdateResponse;
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Thu Aug 07 03:06:29 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  7. docs_src/request_files/tutorial003_an_py39.py

    from fastapi import FastAPI, File, UploadFile
    from fastapi.responses import HTMLResponse
    
    app = FastAPI()
    
    
    @app.post("/files/")
    async def create_files(
        files: Annotated[list[bytes], File(description="Multiple files as bytes")],
    ):
        return {"file_sizes": [len(file) for file in files]}
    
    
    @app.post("/uploadfiles/")
    async def create_upload_files(
        files: Annotated[
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 952 bytes
    - Viewed (0)
  8. docs/de/docs/advanced/behind-a-proxy.md

          prefixes = ["/api/v1"]
    
      [http.routers]
    
        [http.routers.app-http]
          entryPoints = ["http"]
          service = "app"
          rule = "PathPrefix(`/api/v1`)"
          middlewares = ["api-stripprefix"]
    
      [http.services]
    
        [http.services.app]
          [http.services.app.loadBalancer]
            [[http.services.app.loadBalancer.servers]]
              url = "http://127.0.0.1:8000"
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  9. tests/test_schema_extra_examples.py

    
    def create_app():
        app = FastAPI()
    
        class Item(BaseModel):
            data: str
    
            model_config = ConfigDict(
                json_schema_extra={"example": {"data": "Data in schema_extra"}}
            )
    
        @app.post("/schema_extra/")
        def schema_extra(item: Item):
            return item
    
        with pytest.warns(FastAPIDeprecationWarning):
    
            @app.post("/example/")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 32.2K bytes
    - Viewed (0)
  10. docs_src/extending_openapi/tutorial001_py39.py

    from fastapi import FastAPI
    from fastapi.openapi.utils import get_openapi
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items():
        return [{"name": "Foo"}]
    
    
    def custom_openapi():
        if app.openapi_schema:
            return app.openapi_schema
        openapi_schema = get_openapi(
            title="Custom title",
            version="2.5.0",
            summary="This is a very custom OpenAPI schema",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 737 bytes
    - Viewed (0)
Back to top