Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for lena (0.01 sec)

  1. tests/test_request_params/test_file/test_required.py

    # Without aliases
    
    
    @app.post("/required-bytes", operation_id="required_bytes")
    async def read_required_bytes(p: Annotated[bytes, File()]):
        return {"file_size": len(p)}
    
    
    @app.post("/required-uploadfile", operation_id="required_uploadfile")
    async def read_required_uploadfile(p: Annotated[UploadFile, File()]):
        return {"file_size": p.size}
    
    
    @pytest.mark.parametrize(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  2. fastapi/exceptions.py

            if self.endpoint_path:
                context += f"\n    {self.endpoint_path}"
            return context
    
        def __str__(self) -> str:
            message = f"{len(self._errors)} validation error{'s' if len(self._errors) != 1 else ''}:\n"
            for err in self._errors:
                message += f"  {err}\n"
            message += self._format_endpoint_context()
            return message.rstrip()
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  3. fastapi/datastructures.py

        from fastapi import FastAPI, File, UploadFile
    
        app = FastAPI()
    
    
        @app.post("/files/")
        async def create_file(file: Annotated[bytes, File()]):
            return {"file_size": len(file)}
    
    
        @app.post("/uploadfile/")
        async def create_upload_file(file: UploadFile):
            return {"filename": file.filename}
        ```
        """
    
        file: Annotated[
            BinaryIO,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  4. fastapi/_compat/v2.py

            return id(self)
    
    
    def _has_computed_fields(field: ModelField) -> bool:
        computed_fields = field._type_adapter.core_schema.get("schema", {}).get(
            "computed_fields", []
        )
        return len(computed_fields) > 0
    
    
    def get_schema_from_model_field(
        *,
        field: ModelField,
        model_name_map: ModelNameMap,
        field_mapping: dict[
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 19.1K bytes
    - Viewed (0)
  5. fastapi/openapi/utils.py

            (ParamTypes.query, query_params),
            (ParamTypes.header, header_params),
            (ParamTypes.cookie, cookie_params),
        ]
        default_convert_underscores = True
        if len(flat_dependant.header_params) == 1:
            first_field = flat_dependant.header_params[0]
            if lenient_issubclass(first_field.type_, BaseModel):
                default_convert_underscores = getattr(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 23.2K bytes
    - Viewed (0)
Back to top