Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1391 - 1400 of 2,275 for inf1 (0.02 seconds)

  1. docs/zh-hant/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md

    這些依賴會以與一般依賴相同的方式被執行/解析。但它們的值(如果有回傳)不會傳遞給你的路徑操作函式。
    
    /// tip
    
    有些編輯器會檢查未使用的函式參數,並將其標示為錯誤。
    
    把這些依賴放在路徑操作裝飾器中,可以確保它們被執行,同時避免編輯器/工具報錯。
    
    這也有助於避免讓新加入的開發者看到未使用的參數時,以為它是不必要的而感到困惑。
    
    ///
    
    /// info
    
    在這個範例中我們使用了自訂的(虛構的)標頭 `X-Key` 與 `X-Token`。
    
    但在實際情況下,當你實作安全機制時,使用整合的 [Security utilities(下一章)](../security/index.md) 會獲得更多好處。
    
    ///
    
    ## 依賴的錯誤與回傳值 { #dependencies-errors-and-return-values }
    
    你可以使用與平常相同的依賴函式。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 2.7K bytes
    - Click Count (0)
  2. tests/test_tuples.py

    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == snapshot(
            {
                "openapi": "3.1.0",
                "info": {"title": "FastAPI", "version": "0.1.0"},
                "paths": {
                    "/model-with-tuple/": {
                        "post": {
                            "summary": "Post Model With Tuple",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 10.8K bytes
    - Click Count (0)
  3. tests/test_tutorial/test_body_nested_models/test_tutorial007.py

        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == snapshot(
            {
                "openapi": "3.1.0",
                "info": {"title": "FastAPI", "version": "0.1.0"},
                "paths": {
                    "/offers/": {
                        "post": {
                            "responses": {
                                "200": {
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 11.6K bytes
    - Click Count (0)
  4. src/main/java/jcifs/internal/smb2/info/Smb2QueryDirectoryResponse.java

     * License along with this library; if not, write to the Free Software
     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
     */
    package jcifs.internal.smb2.info;
    
    import java.util.ArrayList;
    import java.util.List;
    
    import jcifs.Configuration;
    import jcifs.internal.SMBProtocolDecodingException;
    import jcifs.internal.fscc.FileBothDirectoryInfo;
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 16 01:32:48 GMT 2025
    - 4.1K bytes
    - Click Count (0)
  5. docs/fr/docs/advanced/sub-applications.md

    ### Vérifier la documentation API automatique { #check-the-automatic-api-docs }
    
    Exécutez maintenant la commande `fastapi` :
    
    <div class="termy">
    
    ```console
    $ fastapi dev
    
    <span style="color: green;">INFO</span>:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    ```
    
    </div>
    
    Et ouvrez la documentation à [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs).
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 3.2K bytes
    - Click Count (0)
  6. docs/zh/docs/advanced/response-cookies.md

    /// tip | 提示
    
    需要注意,如果你直接反馈一个response对象,而不是使用`Response`入参,FastAPI则会直接反馈你封装的response对象。
    
    所以你需要确保你响应数据类型的正确性,如:你可以使用`JSONResponse`来兼容JSON的场景。
    
    同时,你也应当仅反馈通过`response_model`过滤过的数据。
    
    ///
    
    ### 更多信息 { #more-info }
    
    /// note | 技术细节
    
    你也可以使用`from starlette.responses import Response` 或者 `from starlette.responses import JSONResponse`。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 2.1K bytes
    - Click Count (0)
  7. tests/test_tutorial/test_body_multiple_params/test_tutorial003.py

        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == snapshot(
            {
                "openapi": "3.1.0",
                "info": {"title": "FastAPI", "version": "0.1.0"},
                "paths": {
                    "/items/{item_id}": {
                        "put": {
                            "responses": {
                                "200": {
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  8. docs/zh-hant/docs/advanced/events.md

    ### `shutdown` 事件 { #shutdown-event }
    
    要加入一個在應用關閉時執行的函式,使用事件 `"shutdown"` 來宣告:
    
    {* ../../docs_src/events/tutorial002_py310.py hl[6] *}
    
    在這裡,`shutdown` 事件處理器函式會把一行文字 `"Application shutdown"` 寫入檔案 `log.txt`。
    
    /// info
    
    在 `open()` 函式中,`mode="a"` 表示「append(附加)」;也就是說,這行文字會加在檔案現有內容之後,而不會覆寫先前的內容。
    
    ///
    
    /// tip
    
    注意這裡我們使用的是標準 Python 的 `open()` 函式來操作檔案。
    
    這涉及 I/O(輸入/輸出),也就是需要「等待」資料寫入磁碟。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 7.2K bytes
    - Click Count (0)
  9. docs/ja/docs/tutorial/testing.md

    [HTTPX](https://www.python-httpx.org) がベースで、さらにその設計は Requests をベースにしているため、とても馴染みがあり直感的です。
    
    これを使用すると、**FastAPI** と共に [pytest](https://docs.pytest.org/) を直接利用できます。
    
    ## `TestClient` を使用 { #using-testclient }
    
    /// info
    
    `TestClient` を使用するには、まず [`httpx`](https://www.python-httpx.org) をインストールします。
    
    [仮想環境](../virtual-environments.md) を作成し、それを有効化してから、例えば以下のようにインストールしてください:
    
    ```console
    $ pip install httpx
    ```
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 7.1K bytes
    - Click Count (0)
  10. docs/de/docs/features.md

    my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
    
    second_user_data = {
        "id": 4,
        "name": "Mary",
        "joined": "2018-11-30",
    }
    
    my_second_user: User = User(**second_user_data)
    ```
    
    /// info | Info
    
    `**second_user_data` bedeutet:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 10.3K bytes
    - Click Count (0)
Back to Top