Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 276 for stats (0.12 sec)

  1. docs/em/docs/tutorial/response-status-code.md

    ```
    
    ๐Ÿ‘ซ ๐Ÿช, ๐Ÿ‘ซ ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ ๐ŸŽ ๐Ÿ”ข, โœ‹๏ธ ๐Ÿ‘ˆ ๐ŸŒŒ ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ ๐Ÿ‘จโ€๐ŸŽจ ๐Ÿ“‹ ๐Ÿ”Ž ๐Ÿ‘ซ:
    
    <img src="/img/tutorial/response-status-code/image02.png">
    
    !!! note "๐Ÿ“ก โ„น"
        ๐Ÿ‘† ๐Ÿ’ช โš™๏ธ `from starlette import status`.
    
        **FastAPI** ๐Ÿšš ๐ŸŽ `starlette.status` `fastapi.status` ๐Ÿช ๐Ÿ‘†, ๐Ÿ‘ฉโ€๐Ÿ’ป. โœ‹๏ธ โšซ๏ธ ๐Ÿ‘Ÿ ๐Ÿ”— โšช๏ธโžก๏ธ ๐Ÿ’ƒ.
    
    ## ๐Ÿ”€ ๐Ÿ”ข
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  2. docs/em/docs/advanced/response-change-status-code.md

    &amp; โคด๏ธ ๐Ÿ‘† ๐Ÿ’ช โš’ `status_code` ๐Ÿ‘ˆ *๐Ÿ”€* ๐Ÿ“จ ๐ŸŽš.
    
    ```Python hl_lines="1  9  12"
    {!../../../docs_src/response_change_status_code/tutorial001.py!}
    ```
    
    &amp; โคด๏ธ ๐Ÿ‘† ๐Ÿ’ช ๐Ÿ“จ ๐Ÿ™† ๐ŸŽš ๐Ÿ‘† ๐Ÿ’ช, ๐Ÿ‘† ๐Ÿ›Ž ๐Ÿ”œ ( `dict`, ๐Ÿ’ฝ ๐Ÿท, โ™’๏ธ).
    
    &amp; ๐Ÿšฅ ๐Ÿ‘† ๐Ÿ“ฃ `response_model`, โšซ๏ธ ๐Ÿ”œ โš™๏ธ โ›ฝ &amp; ๐Ÿ—œ ๐ŸŽš ๐Ÿ‘† ๐Ÿ“จ.
    
    **FastAPI** ๐Ÿ”œ โš™๏ธ ๐Ÿ‘ˆ *๐Ÿ”€* ๐Ÿ“จ โš— ๐Ÿ‘” ๐Ÿ“Ÿ (๐Ÿช &amp; ๐ŸŽš), &amp; ๐Ÿ”œ ๐Ÿšฎ ๐Ÿ‘ซ ๐Ÿ ๐Ÿ“จ ๐Ÿ‘ˆ ๐Ÿ”Œ ๐Ÿ’ฒ ๐Ÿ‘† ๐Ÿ“จ, โ›ฝ ๐Ÿ™† `response_model`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Apr 01 09:26:04 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  3. docs/de/docs/reference/fastapi.md

    ```python
    from fastapi import FastAPI
    ```
    
    ::: fastapi.FastAPI
        options:
            members:
                - openapi_version
                - webhooks
                - state
                - dependency_overrides
                - openapi
                - websocket
                - include_router
                - get
                - put
                - post
                - delete
                - options
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Feb 18 12:19:32 GMT 2024
    - 715 bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/static-files.md

    You can read more about this in the [Advanced User Guide](../advanced/index.md){.internal-link target=_blank}.
    
    ## Details
    
    The first `"/static"` refers to the sub-path this "sub-application" will be "mounted" on. So, any path that starts with `"/static"` will be handled by it.
    
    The `directory="static"` refers to the name of the directory that contains your static files.
    
    The `name="static"` gives it a name that can be used internally by **FastAPI**.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jan 11 19:56:09 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/testing.md

        E.g. `pip install httpx`.
    
    Import `TestClient`.
    
    Create a `TestClient` by passing your **FastAPI** application to it.
    
    Create functions with a name that starts with `test_` (this is standard `pytest` conventions).
    
    Use the `TestClient` object the same way as you do with `httpx`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/path-params.md

    !!! check
        So, with the same Python type declaration, **FastAPI** gives you data validation.
    
        Notice that the error also clearly states exactly the point where the validation didn't pass.
    
        This is incredibly helpful while developing and debugging code that interacts with your API.
    
    ## Documentation
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  7. docs/zh/docs/advanced/additional-status-codes.md

    ไพ‹ๅฆ‚๏ผŒๅ‡่ฎพไฝ ๆƒณๆœ‰ไธ€ไธช *่ทฏๅพ„ๆ“ไฝœ* ่ƒฝๅคŸๆ›ดๆ–ฐๆก็›ฎ๏ผŒๅนถไธ”ๆ›ดๆ–ฐๆˆๅŠŸๆ—ถ่ฟ”ๅ›ž 200 ใ€ŒๆˆๅŠŸใ€ ็š„ HTTP ็Šถๆ€็ ใ€‚
    
    ไฝ†ๆ˜ฏไฝ ไนŸๅธŒๆœ›ๅฎƒ่ƒฝๅคŸๆŽฅๅ—ๆ–ฐ็š„ๆก็›ฎใ€‚ๅนถไธ”ๅฝ“่ฟ™ไบ›ๆก็›ฎไธๅญ˜ๅœจๆ—ถ๏ผŒไผš่‡ชๅŠจๅˆ›ๅปบๅนถ่ฟ”ๅ›ž 201 ใ€Œๅˆ›ๅปบใ€็š„ HTTP ็Šถๆ€็ ใ€‚
    
    ่ฆๅฎž็Žฐๅฎƒ๏ผŒๅฏผๅ…ฅ `JSONResponse`๏ผŒ็„ถๅŽๅœจๅ…ถไธญ็›ดๆŽฅ่ฟ”ๅ›žไฝ ็š„ๅ†…ๅฎน๏ผŒๅนถๅฐ† `status_code` ่ฎพ็ฝฎไธบไธบไฝ ่ฆ็š„ๅ€ผใ€‚
    
    ```Python hl_lines="4  25"
    {!../../../docs_src/additional_status_codes/tutorial001.py!}
    ```
    
    !!! warning "่ญฆๅ‘Š"
        ๅฝ“ไฝ ็›ดๆŽฅ่ฟ”ๅ›žไธ€ไธชๅƒไธŠ้ขไพ‹ๅญไธญ็š„ `Response` ๅฏน่ฑกๆ—ถ๏ผŒๅฎƒไผš็›ดๆŽฅ่ฟ”ๅ›žใ€‚
    
        FastAPI ไธไผš็”จๆจกๅž‹็ญ‰ๅฏน่ฏฅๅ“ๅบ”่ฟ›่กŒๅบๅˆ—ๅŒ–ใ€‚
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.8K bytes
    - Viewed (0)
  8. tests/test_dependency_contextvars.py

    legacy_request_state_context_var: ContextVar[Optional[Dict[str, Any]]] = ContextVar(
        "legacy_request_state_context_var", default=None
    )
    
    app = FastAPI()
    
    
    async def set_up_request_state_dependency():
        request_state = {"user": "deadpond"}
        contextvar_token = legacy_request_state_context_var.set(request_state)
        yield request_state
        legacy_request_state_context_var.reset(contextvar_token)
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Feb 17 12:40:12 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  9. docs/en/docs/reference/websockets.md

                - url
                - base_url
                - headers
                - query_params
                - path_params
                - cookies
                - client
                - state
                - url_for
                - client_state
                - application_state
                - receive
                - send
                - accept
                - receive_text
                - receive_bytes
                - receive_json
                - iter_text
    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)
  10. docs/pt/docs/tutorial/response-status-code.md

    Da mesma forma que vocรช pode especificar um modelo de resposta, vocรช tambรฉm pode declarar o cรณdigo de status HTTP usado para a resposta com o parรขmetro `status_code` em qualquer uma das *operaรงรตes de caminho*:
    
    * `@app.get()`
    * `@app.post()`
    * `@app.put()`
    * `@app.delete()`
    * etc.
    
    ```Python hl_lines="6"
    {!../../../docs_src/response_status_code/tutorial001.py!}
    ```
    
    !!! note "Nota"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Oct 31 16:22:07 GMT 2022
    - 4.3K bytes
    - Viewed (0)
Back to top