Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for clone (0.13 sec)

  1. fastapi/utils.py

                create_cloned_field(sub_field, cloned_types=cloned_types)
                for sub_field in field.sub_fields  # type: ignore[attr-defined]
            ]
        if field.key_field:  # type: ignore[attr-defined]
            new_field.key_field = create_cloned_field(  # type: ignore[attr-defined]
                field.key_field,  # type: ignore[attr-defined]
                cloned_types=cloned_types,
            )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  2. docs/en/docs/reference/uploadfile.md

            members:
                - file
                - filename
                - size
                - headers
                - content_type
                - read
                - write
                - seek
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 472 bytes
    - Viewed (0)
  3. docs/en/docs/reference/websockets.md

                - receive_bytes
                - receive_json
                - iter_text
                - iter_bytes
                - iter_json
                - send_text
                - send_bytes
                - send_json
                - close
    
    When a client disconnects, a `WebSocketDisconnect` exception is raised, you can catch it.
    
    You can import it directly form `fastapi`:
    
    ```python
    from fastapi import WebSocketDisconnect
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  4. docs/en/docs/release-notes.md

            * When a `response_model` is declared, the same `response_model` type declaration won't be used as is, it will be "cloned" to create an new one (a cloned Pydantic `Field` with all the submodels cloned as well).
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  5. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

    # ๐Ÿ”— โฎ๏ธ ๐ŸŒพ
    
    FastAPI ๐Ÿ•โ€๐Ÿฆบ ๐Ÿ”— ๐Ÿ‘ˆ <abbr title='sometimes also called "exit", "cleanup", "teardown", "close", "context managers", ...'>โž• ๐Ÿ” โฎ๏ธ ๐Ÿ</abbr>.
    
    ๐Ÿ‘‰, โš™๏ธ `yield` โ†ฉ๏ธ `return`, &amp; โœ โž• ๐Ÿ” โฎ๏ธ.
    
    !!! tip
        โš’ ๐Ÿ’ญ โš™๏ธ `yield` 1๏ธโƒฃ ๐Ÿ‘ ๐Ÿ•ฐ.
    
    !!! note "๐Ÿ“ก โ„น"
        ๐Ÿ™† ๐Ÿ”ข ๐Ÿ‘ˆ โ˜‘ โš™๏ธ โฎ๏ธ:
    
        * <a href="https://docs.python.org/3/library/contextlib.html#contextlib.contextmanager" class="external-link" target="_blank">`@contextlib.contextmanager`</a> โš–๏ธ
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/bigger-applications.md

        This is because we want to include their *path operations* in the OpenAPI schema and the user interfaces.
    
        As we cannot just isolate them and "mount" them independently of the rest, the *path operations* are "cloned" (re-created), not included directly.
    
    ## Check the automatic API docs
    
    Now, run `uvicorn`, using the module `app.main` and the variable `app`:
    
    <div class="termy">
    
    ```console
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  7. tests/test_filter_pydantic_sub_model_pv2.py

        assert response.json() == {
            "name": "modelA",
            "description": "model-a-desc",
            "foo": {"username": "test-user"},
        }
    
    
    @needs_pydanticv2
    def test_validator_is_cloned(client: TestClient):
        with pytest.raises(ResponseValidationError) as err:
            client.get("/model/modelX")
        assert err.value.errors() == [
            IsDict(
                {
                    "type": "value_error",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  8. docs/en/docs/help-fastapi.md

    ### Ask to close
    
    If they reply, there's a high chance you would have solved their problem, congrats, **you're a hero**! ๐Ÿฆธ
    
    * Now, if that solved their problem, you can ask them to:
    
        * In GitHub Discussions: mark the comment as the **answer**.
        * In GitHub Issues: **close** the issue.
    
    ## Watch the GitHub repository
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 13.7K bytes
    - Viewed (0)
  9. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    # yieldใ‚’ๆŒใคไพๅญ˜้–ขไฟ‚
    
    FastAPIใฏใ€ใ„ใใคใ‹ใฎ<abbr title='ๆ™‚ใ€…"exit"ใ€"cleanup"ใ€"teardown"ใ€"close"ใ€"context managers"ใ€ ...ใฎใ‚ˆใ†ใซๅ‘ผใฐใ‚Œใ‚‹'>็ต‚ไบ†ๅพŒใฎ่ฟฝๅŠ ใฎใ‚นใƒ†ใƒƒใƒ—</abbr>ใ‚’่กŒใ†ไพๅญ˜้–ขไฟ‚ใ‚’ใ‚ตใƒใƒผใƒˆใ—ใฆใ„ใพใ™ใ€‚
    
    ใ“ใ‚Œใ‚’่กŒใ†ใซใฏใ€`return`ใฎไปฃใ‚ใ‚Šใซ`yield`ใ‚’ไฝฟใ„ใ€ใใฎๅพŒใซ่ฟฝๅŠ ใฎใ‚นใƒ†ใƒƒใƒ—ใ‚’ๆ›ธใใพใ™ใ€‚
    
    !!! tip "่ฑ†็Ÿฅ่ญ˜"
        `yield`ใฏๅฟ…ใšไธ€ๅบฆใ ใ‘ไฝฟ็”จใ™ใ‚‹ใ‚ˆใ†ใซใ—ใฆใใ ใ•ใ„ใ€‚
    
    !!! info "ๆƒ…ๅ ฑ"
        ใ“ใ‚Œใ‚’ๅ‹•ไฝœใ•ใ›ใ‚‹ใซใฏใ€**Python 3.7** ไปฅไธŠใ‚’ไฝฟ็”จใ™ใ‚‹ใ‹ใ€**Python 3.6** ใงใฏ"backports"ใ‚’ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ™ใ‚‹ๅฟ…่ฆใŒใ‚ใ‚Šใพใ™:
    
        ```
        pip install async-exit-stack async-generator
        ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  10. docs/en/docs/fastapi-cli.md

    By default it will listen on the IP address `127.0.0.1`, which is the IP for your machine to communicate with itself alone (`localhost`).
    
    ## `fastapi run`
    
    When you run `fastapi run`, it will run on production mode by default.
    
    It will have **auto-reload disabled** by default.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:16 GMT 2024
    - 6.1K bytes
    - Viewed (0)
Back to top