Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for u_size (0.19 sec)

  1. tests/test_custom_middleware_exception.py

    class ContentSizeLimitMiddleware:
        """Content size limiting middleware for ASGI applications
        Args:
          app (ASGI application): ASGI application
          max_content_size (optional): the maximum content size allowed in bytes, None for no limit
        """
    
        def __init__(self, app: APIRouter, max_content_size: Optional[int] = None):
            self.app = app
            self.max_content_size = max_content_size
    
        def receive_wrapper(self, receive):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Aug 25 21:44:40 GMT 2022
    - 2.8K bytes
    - Viewed (0)
  2. docs_src/additional_status_codes/tutorial001_py310.py

    app = FastAPI()
    
    items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}}
    
    
    @app.put("/items/{item_id}")
    async def upsert_item(
        item_id: str,
        name: str | None = Body(default=None),
        size: int | None = Body(default=None),
    ):
        if item_id in items:
            item = items[item_id]
            item["name"] = name
            item["size"] = size
            return item
        else:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 646 bytes
    - Viewed (0)
  3. docs_src/additional_status_codes/tutorial001_an_py310.py

    app = FastAPI()
    
    items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}}
    
    
    @app.put("/items/{item_id}")
    async def upsert_item(
        item_id: str,
        name: Annotated[str | None, Body()] = None,
        size: Annotated[int | None, Body()] = None,
    ):
        if item_id in items:
            item = items[item_id]
            item["name"] = name
            item["size"] = size
            return item
        else:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 686 bytes
    - Viewed (0)
  4. docs/en/docs/img/deployment/https/https.drawio

                    <mxCell id="62" value="&lt;font face=&quot;Roboto&quot; data-font-src=&quot;https://fonts.googleapis.com/css?family=Roboto&quot; style=&quot;font-size: 24px&quot;&gt;FastAPI&lt;/font&gt;&lt;font face=&quot;Roboto&quot; data-font-src=&quot;https://fonts.googleapis.com/css?family=Roboto&quot; style=&quot;font-size: 24px ; font-weight: normal&quot;&gt; app for: someapp.example.com&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontStyle=1;strokeWidth=4;fillColor=#dae8fc;s...
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 25.7K bytes
    - Viewed (0)
  5. docs/en/docs/img/deployment/https/https05.drawio

                    <mxCell id="62" value="&lt;font face=&quot;Roboto&quot; data-font-src=&quot;https://fonts.googleapis.com/css?family=Roboto&quot; style=&quot;font-size: 24px&quot;&gt;FastAPI&lt;/font&gt;&lt;font face=&quot;Roboto&quot; data-font-src=&quot;https://fonts.googleapis.com/css?family=Roboto&quot; style=&quot;font-size: 24px ; font-weight: normal&quot;&gt; app for: someapp.example.com&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontStyle=1;strokeWidth=4;fillColor=#dae8fc;s...
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 15.6K bytes
    - Viewed (0)
  6. docs/en/docs/img/deployment/https/https06.drawio

                    <mxCell id="62" value="&lt;font face=&quot;Roboto&quot; data-font-src=&quot;https://fonts.googleapis.com/css?family=Roboto&quot; style=&quot;font-size: 24px&quot;&gt;FastAPI&lt;/font&gt;&lt;font face=&quot;Roboto&quot; data-font-src=&quot;https://fonts.googleapis.com/css?family=Roboto&quot; style=&quot;font-size: 24px ; font-weight: normal&quot;&gt; app for: someapp.example.com&lt;/font&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontStyle=1;strokeWidth=4;fillColor=#dae8fc;s...
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 17.1K bytes
    - Viewed (0)
  7. docs/en/docs/img/deployment/https/https03.drawio

                        <mxGeometry x="330" y="680" width="170" height="120" as="geometry"/>
                    </mxCell>
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 12.3K bytes
    - Viewed (0)
  8. fastapi/datastructures.py

        ]
        filename: Annotated[Optional[str], Doc("The original file name.")]
        size: Annotated[Optional[int], Doc("The size of the file in bytes.")]
        headers: Annotated[Headers, Doc("The headers of the request.")]
        content_type: Annotated[
            Optional[str], Doc("The content type of the request, from the headers.")
        ]
    
        async def write(
            self,
            data: Annotated[
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_request_files/test_tutorial001_an_py39.py

        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 14}
    
    
    @needs_py39
    def test_post_large_file(tmp_path, client: TestClient):
        default_pydantic_max_size = 2**16
        path = tmp_path / "test.txt"
        path.write_bytes(b"x" * (default_pydantic_max_size + 1))
    
        with path.open("rb") as file:
            response = client.post("/files/", files={"file": file})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  10. docs_src/extra_models/tutorial003.py

        type: str = "car"
    
    
    class PlaneItem(BaseItem):
        type: str = "plane"
        size: int
    
    
    items = {
        "item1": {"description": "All my friends drive a low rider", "type": "car"},
        "item2": {
            "description": "Music is my aeroplane, it's my aeroplane",
            "type": "plane",
            "size": 5,
        },
    }
    
    
    @app.get("/items/{item_id}", response_model=Union[PlaneItem, CarItem])
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 644 bytes
    - Viewed (1)
Back to top