Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1131 - 1140 of 2,110 for py (0.02 seconds)

  1. docs/zh-hant/docs/tutorial/middleware.md

    中介軟體函式會接收:
    
    - `request`。
    - 一個函式 `call_next`,會以 `request` 作為參數。
        - 這個函式會把 `request` 傳給對應的*路徑操作*。
        - 然後回傳對應*路徑操作*所產生的 `response`。
    - 然後你可以在回傳之前進一步修改 `response`。
    
    {* ../../docs_src/middleware/tutorial001_py310.py hl[8:9,11,14] *}
    
    /// tip
    
    請記得,自訂的非標準標頭可以[使用 `X-` 前綴](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers)。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  2. clause/clause.go

    		}
    
    		c.Expression.Build(builder)
    
    		if c.AfterExpression != nil {
    			builder.WriteByte(' ')
    			c.AfterExpression.Build(builder)
    		}
    	}
    }
    
    const (
    	PrimaryKey   string = "~~~py~~~" // primary key
    	CurrentTable string = "~~~ct~~~" // current table
    	Associations string = "~~~as~~~" // associations
    )
    
    var (
    	currentTable  = Table{Name: CurrentTable}
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Mar 21 11:35:55 GMT 2026
    - 1.8K bytes
    - Click Count (0)
  3. docs/ja/docs/tutorial/cookie-param-models.md

    ///
    
    ## Pydanticモデルを使用したクッキー { #cookies-with-a-pydantic-model }
    
    必要な複数の**クッキー**パラメータを**Pydanticモデル**で宣言し、さらに、パラメータを `Cookie` として宣言しましょう:
    
    {* ../../docs_src/cookie_param_models/tutorial001_an_py310.py hl[9:12,16] *}
    
    **FastAPI**は、リクエストで受け取った**クッキー**から**それぞれのフィールド**のデータを**抽出**し、定義したPydanticモデルを提供します。
    
    ## ドキュメントの確認 { #check-the-docs }
    
    対話的APIドキュメントUI `/docs` で、定義されているクッキーを確認できます:
    
    <div class="screenshot">
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 15:24:30 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  4. docs/ko/docs/how-to/authentication-error-status-code.md

    예를 들어, 기본값인 `401 Unauthorized` 오류 대신 `403 Forbidden` 오류를 반환하는 `HTTPBearer`의 서브클래스를 만들 수 있습니다:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py310.py hl[9:13] *}
    
    /// tip | 팁
    
    함수는 예외를 `return`하는 것이지 `raise`하지 않는다는 점에 유의하세요. 예외를 발생시키는(`raise`) 작업은 내부 코드의 나머지 부분에서 수행됩니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 1.3K bytes
    - Click Count (0)
  5. docs/ja/docs/advanced/generate-clients.md

    これらのソリューションの中にはオープンソースや無料枠を提供するものもあり、金銭的コミットメントなしで試すことができます。他の商用 SDK ジェネレータも存在し、オンラインで見つけられます。🤓
    
    ## TypeScript SDK を作成する { #create-a-typescript-sdk }
    
    まずは簡単な FastAPI アプリから始めます:
    
    {* ../../docs_src/generate_clients/tutorial001_py310.py hl[7:9,12:13,16:17,21] *}
    
    ここで、*path operation* はリクエストとレスポンスのペイロードに使用するモデルを定義しており、`Item` と `ResponseMessage` を使っています。
    
    ### API ドキュメント { #api-docs }
    
    `/docs` に移動すると、リクエストで送信・レスポンスで受信するデータの**スキーマ**が表示されます:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 11.1K bytes
    - Click Count (0)
  6. docs/en/docs/tutorial/static-files.md

    ## Use `StaticFiles` { #use-staticfiles }
    
    * Import `StaticFiles`.
    * "Mount" a `StaticFiles()` instance in a specific path.
    
    {* ../../docs_src/static_files/tutorial001_py310.py hl[2,6] *}
    
    /// note | Technical Details
    
    You could also use `from starlette.staticfiles import StaticFiles`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 1.6K bytes
    - Click Count (0)
  7. docs/zh/docs/tutorial/debugging.md

    {* ../../docs_src/debugging/tutorial001_py310.py hl[1,15] *}
    
    ### 关于 `__name__ == "__main__"` { #about-name-main }
    
    `__name__ == "__main__"` 的主要目的是使用以下代码调用文件时执行一些代码:
    
    <div class="termy">
    
    ```console
    $ python myapp.py
    ```
    
    </div>
    
    而当其它文件导入它时并不会被调用,像这样:
    
    ```Python
    from myapp import app
    ```
    
    #### 更多细节 { #more-details }
    
    假设你的文件命名为 `myapp.py`。
    
    如果你这样运行:
    
    <div class="termy">
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 2.4K bytes
    - Click Count (0)
  8. docs/en/docs/tutorial/encoder.md

    You can use `jsonable_encoder` for that.
    
    It receives an object, like a Pydantic model, and returns a JSON compatible version:
    
    {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *}
    
    In this example, it would convert the Pydantic model to a `dict`, and the `datetime` to a `str`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 1.6K bytes
    - Click Count (0)
  9. docs/en/docs/advanced/response-change-status-code.md

    And then you can set the `status_code` in that *temporal* response object.
    
    {* ../../docs_src/response_change_status_code/tutorial001_py310.py hl[1,9,12] *}
    
    And then you can return any object you need, as you normally would (a `dict`, a database model, etc).
    
    And if you declared a `response_model`, it will still be used to filter and convert the object you returned.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 1.5K bytes
    - Click Count (0)
  10. docs/ja/docs/tutorial/dependencies/global-dependencies.md

    [`dependencies` を path operation のデコレータに追加](dependencies-in-path-operation-decorators.md)できるのと同様に、`FastAPI` アプリケーション自体にも追加できます。
    
    その場合、アプリケーション内のすべての path operation に適用されます:
    
    {* ../../docs_src/dependencies/tutorial012_an_py310.py hl[17] *}
    
    また、[`dependencies` を path operation のデコレータに追加](dependencies-in-path-operation-decorators.md)する節で説明した考え方はすべて引き続き当てはまりますが、この場合はアプリ内のすべての path operation に対して適用されます。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 1.2K bytes
    - Click Count (0)
Back to Top