Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 98 for Size (0.16 sec)

  1. docs_src/additional_status_codes/tutorial001.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: Union[str, None] = Body(default=None),
        size: Union[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: Fri May 13 23:38:22 GMT 2022
    - 684 bytes
    - Viewed (0)
  2. docs/en/docs/img/tutorial/bigger-applications/package.drawio

                    </mxCell>
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 12 00:06:16 GMT 2022
    - 6.1K bytes
    - Viewed (0)
  3. docs/en/docs/img/deployment/https/https08.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
    - 20.9K bytes
    - Viewed (0)
  4. docs/en/layouts/custom.yml

    # Specification
    # -----------------------------------------------------------------------------
    
    # Card size and layers
    size: { width: 1200, height: 630 }
    layers:
    
      # Background
      - background:
          image: *background_image
          color: *background_color
    
      # Logo
      - size: { width: 144, height: 144 }
        offset: { x: 992, y: 64 }
        background:
          image: *logo
        icon:
    Others
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jun 26 14:05:43 GMT 2023
    - 6.5K bytes
    - Viewed (0)
  5. docs_src/additional_status_codes/tutorial001_an_py39.py

    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[Union[str, None], Body()] = None,
        size: Annotated[Union[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
    - 705 bytes
    - Viewed (0)
  6. tests/test_datastructures.py

    @pytest.mark.anyio
    async def test_upload_file():
        stream = io.BytesIO(b"data")
        file = UploadFile(filename="file", file=stream, size=4)
        assert await file.read() == b"data"
        assert file.size == 4
        await file.write(b" and more data!")
        assert await file.read() == b""
        assert file.size == 19
        await file.seek(0)
        assert await file.read() == b"data and more data!"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 2K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_additional_status_codes/test_tutorial001.py

        assert response.status_code == 200, response.text
        assert response.json() == {"name": "Wrestlers", "size": None}
    
    
    def test_create():
        response = client.put("/items/red", json={"name": "Chillies"})
        assert response.status_code == 201, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 546 bytes
    - Viewed (0)
  8. docs/en/docs/css/termynal.css

        --color-text: #eee;
        --color-text-subtle: #a2a2a2;
    }
    
    [data-termynal] {
        width: 750px;
        max-width: 100%;
        background: var(--color-bg);
        color: var(--color-text);
        /* font-size: 18px; */
        font-size: 15px;
        /* font-family: 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace; */
        font-family: 'Roboto Mono', 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace;
    CSS
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  9. docs/en/docs/img/deployment/https/https07.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
    - 18.7K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_request_files/test_tutorial001.py

        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 14}
    
    
    def test_post_large_file(tmp_path):
        default_pydantic_max_size = 2**16
        path = tmp_path / "test.txt"
        path.write_bytes(b"x" * (default_pydantic_max_size + 1))
    
        client = TestClient(app)
        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)
Back to top