Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 671 - 680 of 1,045 for cython (0.06 seconds)

  1. docs/en/docs/tutorial/query-params.md

    But when you declare them with Python types (in the example above, as `int`), they are converted to that type and validated against it.
    
    All the same process that applied for path parameters also applies for query parameters:
    
    * Editor support (obviously)
    * Data <dfn title="converting the string that comes from an HTTP request into Python data">"parsing"</dfn>
    * Data validation
    * Automatic documentation
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4.5K bytes
    - Click Count (0)
  2. docs/ru/docs/tutorial/body-multiple-params.md

    Поскольку по умолчанию, отдельные значения интерпретируются как query-параметры, вам не нужно явно добавлять `Query`, вы можете просто сделать так:
    
    ```Python
    q: str | None = None
    ```
    
    Например:
    
    {* ../../docs_src/body_multiple_params/tutorial004_an_py310.py hl[28] *}
    
    /// info | Информация
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 19:57:34 GMT 2026
    - 8.2K bytes
    - Click Count (0)
  3. docs/zh-hant/docs/advanced/middleware.md

    一般來說,ASGI 中介軟體是類別,預期第一個參數接收一個 ASGI 應用程式。
    
    因此,在第三方 ASGI 中介軟體的文件中,通常會指示你這樣做:
    
    ```Python
    from unicorn import UnicornMiddleware
    
    app = SomeASGIApp()
    
    new_app = UnicornMiddleware(app, some_config="rainbow")
    ```
    
    但 FastAPI(實際上是 Starlette)提供了一種更簡單的方式,確保內部中介軟體能處理伺服器錯誤,且自訂例外處理器可正常運作。
    
    為此,你可以使用 `app.add_middleware()`(如同 CORS 範例)。
    
    ```Python
    from fastapi import FastAPI
    from unicorn import UnicornMiddleware
    
    app = FastAPI()
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 3.9K bytes
    - Click Count (0)
  4. docs/fr/docs/advanced/openapi-callbacks.md

    Le code réel du callback dépendra fortement de votre application API.
    
    Et il variera probablement beaucoup d’une application à l’autre.
    
    Cela pourrait être seulement une ou deux lignes de code, comme :
    
    ```Python
    callback_url = "https://example.com/api/v1/invoices/events/"
    httpx.post(callback_url, json={"description": "Invoice paid", "paid": True})
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 8.7K bytes
    - Click Count (0)
  5. docs/zh/docs/advanced/openapi-callbacks.md

    ///
    
    此处唯一比较新的内容是*路径操作装饰器*中的 `callbacks=invoices_callback_router.routes` 参数,下文介绍。
    
    ## 存档回调 { #documenting-the-callback }
    
    实际的回调代码高度依赖于您自己的 API 应用。
    
    并且可能每个应用都各不相同。
    
    回调代码可能只有一两行,比如:
    
    ```Python
    callback_url = "https://example.com/api/v1/invoices/events/"
    httpx.post(callback_url, json={"description": "Invoice paid", "paid": True})
    ```
    
    但回调最重要的部分可能是,根据 API 要发送给回调请求体的数据等内容,确保您的 API 用户(外部开发者)正确地实现*外部 API*。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 6.6K bytes
    - Click Count (0)
  6. docs/en/docs/reference/security/index.md

    You can import them from `fastapi.security`:
    
    ```python
    from fastapi.security import (
        APIKeyCookie,
        APIKeyHeader,
        APIKeyQuery,
        HTTPAuthorizationCredentials,
        HTTPBasic,
        HTTPBasicCredentials,
        HTTPBearer,
        HTTPDigest,
        OAuth2,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 04 12:41:54 GMT 2026
    - 1.7K bytes
    - Click Count (0)
  7. docs/fr/docs/advanced/advanced-dependencies.md

    Imaginons que nous voulions avoir une dépendance qui vérifie si le paramètre de requête `q` contient un contenu fixe.
    
    Mais nous voulons pouvoir paramétrer ce contenu fixe.
    
    ## Une instance « callable » { #a-callable-instance }
    
    En Python, il existe un moyen de rendre une instance de classe « callable ».
    
    Pas la classe elle‑même (qui est déjà un callable), mais une instance de cette classe.
    
    Pour cela, nous déclarons une méthode `__call__` :
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 10.6K bytes
    - Click Count (0)
  8. docs/en/docs/tutorial/response-model.md

    {* ../../docs_src/response_model/tutorial002_py310.py hl[7,9] *}
    
    /// info
    
    To use `EmailStr`, first install [`email-validator`](https://github.com/JoshData/python-email-validator).
    
    Make sure you create a [virtual environment](../virtual-environments.md), activate it, and then install it, for example:
    
    ```console
    $ pip install email-validator
    ```
    
    or with:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 15.5K bytes
    - Click Count (0)
  9. docs/pt/docs/tutorial/response-model.md

    {* ../../docs_src/response_model/tutorial002_py310.py hl[7,9] *}
    
    /// info | Informação
    
    Para usar `EmailStr`, primeiro instale [`email-validator`](https://github.com/JoshData/python-email-validator).
    
    Certifique-se de criar um [ambiente virtual](../virtual-environments.md), ative-o e então instale-o, por exemplo:
    
    ```console
    $ pip install email-validator
    ```
    
    ou com:
    
    ```console
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 16.7K bytes
    - Click Count (0)
  10. fastapi/security/oauth2.py

        Read more about it in the
        [FastAPI docs for Simple OAuth2 with Password and Bearer](https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/).
    
        ## Example
    
        ```python
        from typing import Annotated
    
        from fastapi import Depends, FastAPI
        from fastapi.security import OAuth2PasswordRequestForm
    
        app = FastAPI()
    
    
        @app.post("/login")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Mar 24 16:32:10 GMT 2026
    - 23.6K bytes
    - Click Count (0)
Back to Top