diff --git a/docs/ja/docs/index.md b/docs/ja/docs/index.md index a974901bdb..a8b9741985 100644 --- a/docs/ja/docs/index.md +++ b/docs/ja/docs/index.md @@ -11,16 +11,16 @@ FastAPI フレームワーク、高パフォーマンス、学びやすい、素早くコーディングできる、本番運用に対応

- + Test - + Coverage - + Package version - + Supported Python versions

@@ -55,16 +55,16 @@ FastAPI は、Python の標準である型ヒントに基づいて Python で AP ### Keystone Sponsor { #keystone-sponsor } {% for sponsor in sponsors.keystone -%} - + {% endfor -%} ### Gold and Silver Sponsors { #gold-and-silver-sponsors } {% for sponsor in sponsors.gold -%} - + {% endfor -%} {%- for sponsor in sponsors.silver -%} - + {% endfor %} @@ -75,31 +75,31 @@ FastAPI は、Python の標準である型ヒントに基づいて Python で AP "_[...] 最近 **FastAPI** を使っています。 [...] 実際に私のチームの全ての **Microsoft の機械学習サービス** で使用する予定です。 そのうちのいくつかのコアな **Windows** 製品と **Office** 製品に統合されつつあります。_" -
Kabir Khan - Microsoft (ref)
+
Kabir Khan - Microsoft (ref)
--- "_FastAPIライブラリを採用し、クエリで **予測値** を取得できる **REST** サーバを構築しました。 [for Ludwig]_" -
Piero Molino, Yaroslav Dudin, and Sai Sumanth Miryala - Uber (ref)
+
Piero Molino, Yaroslav Dudin, and Sai Sumanth Miryala - Uber (ref)
--- "_**Netflix** は、**危機管理**オーケストレーションフレームワーク、**Dispatch** のオープンソースリリースを発表できることをうれしく思います。 [built with **FastAPI**]_" -
Kevin Glisson, Marc Vilanova, Forest Monsen - Netflix (ref)
+
Kevin Glisson, Marc Vilanova, Forest Monsen - Netflix (ref)
--- "_私は **FastAPI** にワクワクしています。 めちゃくちゃ楽しいです!_" -
Brian Okken - Python Bytes podcast host (ref)
+
Brian Okken - [Python Bytes](https://pythonbytes.fm/episodes/show/123/time-to-right-the-py-wrongs?time_in_sec=855) podcast host (ref)
--- "_正直、あなたが作ったものは超堅実で洗練されているように見えます。いろんな意味で、それは私が **Hug** にそうなってほしかったものです。誰かがそれを作るのを見るのは本当に刺激的です。_" -
Timothy Crosley - Hug creator (ref)
+
Timothy Crosley - [Hug](https://github.com/hugapi/hug) creator (ref)
--- @@ -107,27 +107,27 @@ FastAPI は、Python の標準である型ヒントに基づいて Python で AP "_私たちの **API** は **FastAPI** に切り替えました [...] きっと気に入ると思います [...]_" -
Ines Montani - Matthew Honnibal - Explosion AI founders - spaCy creators (ref) - (ref)
+
Ines Montani - Matthew Honnibal - [Explosion AI](https://explosion.ai) founders - [spaCy](https://spacy.io) creators (ref) - (ref)
--- "_本番運用の Python API を構築したい方には、**FastAPI** を強くおすすめします。**美しく設計**されており、**使いやすく**、**高いスケーラビリティ**があります。私たちの API ファースト開発戦略の **主要コンポーネント** となり、Virtual TAC Engineer などの多くの自動化やサービスを推進しています。_" -
Deon Pillsbury - Cisco (ref)
+
Deon Pillsbury - Cisco (ref)
--- ## FastAPI ミニドキュメンタリー { #fastapi-mini-documentary } -2025 年末に公開された FastAPI ミニドキュメンタリーがあります。オンラインで視聴できます: +2025 年末に公開された [FastAPI ミニドキュメンタリー](https://www.youtube.com/watch?v=mpR8ngthqiE)があります。オンラインで視聴できます: -FastAPI Mini Documentary +FastAPI Mini Documentary ## **Typer**、CLI 版 FastAPI { #typer-the-fastapi-of-clis } - + -Web API の代わりにターミナルで使用する CLI アプリを構築する場合は、**Typer** を確認してください。 +Web API の代わりにターミナルで使用する CLI アプリを構築する場合は、[**Typer**](https://typer.tiangolo.com/) を確認してください。 **Typer** は FastAPI の弟分です。そして、**CLI 版 FastAPI** を意図しています。 ⌨️ 🚀 @@ -135,12 +135,12 @@ Web API の代わりにターミナルで使用する Starlette -* データの部分は Pydantic +* [Starlette](https://www.starlette.dev/)(Web 部分) +* [Pydantic](https://docs.pydantic.dev/)(データ部分) ## インストール { #installation } -virtual environment を作成して有効化し、それから FastAPI をインストールします。 +[仮想環境](https://fastapi.tiangolo.com/ja/virtual-environments/) を作成して有効化し、それから FastAPI をインストールします。
@@ -199,7 +199,7 @@ async def read_item(item_id: int, q: str | None = None): **注**: -わからない場合は、ドキュメントの `async` と `await` の _"In a hurry?"_ セクションを確認してください。 +わからない場合は、_「In a hurry?」_ セクションの [ドキュメントの `async` と `await`](https://fastapi.tiangolo.com/ja/async/#in-a-hurry) を確認してください。 @@ -237,17 +237,17 @@ INFO: Application startup complete.
fastapi dev コマンドについて -`fastapi dev` コマンドは `main.py` ファイルを読み取り、その中の **FastAPI** アプリを検出し、Uvicorn を使用してサーバーを起動します。 +`fastapi dev` コマンドは `main.py` ファイルを自動的に読み取り、その中の **FastAPI** アプリを検出し、[Uvicorn](https://www.uvicorn.dev) を使用してサーバーを起動します。 デフォルトでは、`fastapi dev` はローカル開発向けに自動リロードを有効にして起動します。 -詳しくは FastAPI CLI docs を参照してください。 +詳しくは [FastAPI CLI docs](https://fastapi.tiangolo.com/ja/fastapi-cli/) を参照してください。
### 動作確認 { #check-it } -ブラウザで http://127.0.0.1:8000/items/5?q=somequery を開きます。 +ブラウザで [http://127.0.0.1:8000/items/5?q=somequery](http://127.0.0.1:8000/items/5?q=somequery) を開きます。 以下の JSON のレスポンスが確認できます。 @@ -264,17 +264,17 @@ INFO: Application startup complete. ### 自動対話型 API ドキュメント { #interactive-api-docs } -次に、http://127.0.0.1:8000/docs にアクセスします。 +次に、[http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) にアクセスします。 -自動対話型 API ドキュメントが表示されます(Swagger UI が提供しています)。 +自動対話型 API ドキュメントが表示されます([Swagger UI](https://github.com/swagger-api/swagger-ui) が提供しています)。 ![Swagger UI](https://fastapi.tiangolo.com/img/index/index-01-swagger-ui-simple.png) ### 代替 API ドキュメント { #alternative-api-docs } -次に、http://127.0.0.1:8000/redoc にアクセスします。 +次に、[http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc) にアクセスします。 -代替の自動ドキュメントが表示されます(ReDoc が提供しています)。 +代替の自動ドキュメントが表示されます([ReDoc](https://github.com/Rebilly/ReDoc) が提供しています)。 ![ReDoc](https://fastapi.tiangolo.com/img/index/index-02-redoc-simple.png) @@ -316,7 +316,7 @@ def update_item(item_id: int, item: Item): ### 自動対話型 API ドキュメントのアップグレード { #interactive-api-docs-upgrade } -次に、http://127.0.0.1:8000/docs にアクセスします。 +次に、[http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs) にアクセスします。 * 自動対話型 API ドキュメントは新しいボディも含めて自動でアップデートされます。 @@ -332,7 +332,7 @@ def update_item(item_id: int, item: Item): ### 代替 API ドキュメントのアップグレード { #alternative-api-docs-upgrade } -次に、http://127.0.0.1:8000/redoc にアクセスします。 +次に、[http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc) にアクセスします。 * 代替のドキュメントにも新しいクエリパラメータやボディが反映されます。 @@ -442,7 +442,7 @@ item: Item * 非常に強力で使いやすい **依存性注入** システム。 * **JWT トークン**を用いた **OAuth2** や **HTTP Basic** 認証のサポートを含む、セキュリティと認証。 * **深くネストされた JSON モデル**を宣言するための、より高度な(しかし同様に簡単な)手法(Pydantic のおかげです)。 -* Strawberry および他のライブラリによる **GraphQL** 統合。 +* [Strawberry](https://strawberry.rocks) および他のライブラリによる **GraphQL** 統合。 * 以下のようなたくさんのおまけ機能(Starlette のおかげです): * **WebSockets** * HTTPX と `pytest` に基づく極めて簡単なテスト @@ -452,7 +452,7 @@ item: Item ### アプリをデプロイ(任意) { #deploy-your-app-optional } -必要に応じて FastAPI アプリを FastAPI Cloud にデプロイできます。まだの場合はウェイティングリストに参加してください。 🚀 +必要に応じて FastAPI アプリを [FastAPI Cloud](https://fastapicloud.com) にデプロイできます。まだの場合はウェイティングリストに参加してください。 🚀 すでに **FastAPI Cloud** アカウント(ウェイティングリストから招待されました 😉)がある場合は、1 コマンドでアプリケーションをデプロイできます。 @@ -474,7 +474,7 @@ Deploying to FastAPI Cloud... #### FastAPI Cloud について { #about-fastapi-cloud } -**FastAPI Cloud** は **FastAPI** の作者と同じチームによって作られています。 +**[FastAPI Cloud](https://fastapicloud.com)** は **FastAPI** の作者と同じチームによって作られています。 最小限の労力で API を **構築**、**デプロイ**、**アクセス** するためのプロセスを効率化します。 @@ -490,9 +490,9 @@ FastAPI はオープンソースであり、標準に基づいています。選 ## パフォーマンス { #performance } -独立した TechEmpower のベンチマークでは、Uvicorn で動作する **FastAPI** アプリケーションが、利用可能な最も高速な Python フレームワークの一つであり、Starlette と Uvicorn(FastAPI で内部的に使用されています)にのみ下回っていると示されています。(*) +独立した TechEmpower のベンチマークでは、Uvicorn で動作する **FastAPI** アプリケーションが、[利用可能な最も高速な Python フレームワークの一つ](https://www.techempower.com/benchmarks/#section=test&runid=7464e520-0dc2-473d-bd34-dbdfd7e85911&hw=ph&test=query&l=zijzen-7)であり、Starlette と Uvicorn(FastAPI で内部的に使用されています)にのみ下回っていると示されています。(*) -詳細は Benchmarks セクションをご覧ください。 +詳細は [Benchmarks](https://fastapi.tiangolo.com/ja/benchmarks/) セクションをご覧ください。 ## 依存関係 { #dependencies } @@ -504,19 +504,19 @@ FastAPI を `pip install "fastapi[standard]"` でインストールすると、` Pydantic によって使用されるもの: -* email-validator - メール検証のため。 +* [`email-validator`](https://github.com/JoshData/python-email-validator) - メール検証のため。 Starlette によって使用されるもの: -* httpx - `TestClient` を使用したい場合に必要です。 -* jinja2 - デフォルトのテンプレート設定を使用したい場合に必要です。 -* python-multipart - `request.form()` とともに、フォームの 「parsing」 をサポートしたい場合に必要です。 +* [`httpx`](https://www.python-httpx.org) - `TestClient` を使用したい場合に必要です。 +* [`jinja2`](https://jinja.palletsprojects.com) - デフォルトのテンプレート設定を使用したい場合に必要です。 +* [`python-multipart`](https://github.com/Kludex/python-multipart) - `request.form()` とともに、フォームの 「parsing」 をサポートしたい場合に必要です。 FastAPI によって使用されるもの: -* uvicorn - アプリケーションをロードして提供するサーバーのため。これには `uvicorn[standard]` も含まれ、高性能なサービングに必要な依存関係(例: `uvloop`)が含まれます。 +* [`uvicorn`](https://www.uvicorn.dev) - アプリケーションをロードして提供するサーバーのため。これには `uvicorn[standard]` も含まれ、高性能なサービングに必要な依存関係(例: `uvloop`)が含まれます。 * `fastapi-cli[standard]` - `fastapi` コマンドを提供します。 - * これには `fastapi-cloud-cli` が含まれ、FastAPI アプリケーションを FastAPI Cloud にデプロイできます。 + * これには `fastapi-cloud-cli` が含まれ、FastAPI アプリケーションを [FastAPI Cloud](https://fastapicloud.com) にデプロイできます。 ### `standard` 依存関係なし { #without-standard-dependencies } @@ -532,13 +532,13 @@ FastAPI によって使用されるもの: 追加のオプション Pydantic 依存関係: -* pydantic-settings - 設定管理のため。 -* pydantic-extra-types - Pydantic で使用する追加の型のため。 +* [`pydantic-settings`](https://docs.pydantic.dev/latest/usage/pydantic_settings/) - 設定管理のため。 +* [`pydantic-extra-types`](https://docs.pydantic.dev/latest/usage/types/extra_types/extra_types/) - Pydantic で使用する追加の型のため。 追加のオプション FastAPI 依存関係: -* orjson - `ORJSONResponse` を使用したい場合に必要です。 -* ujson - `UJSONResponse` を使用したい場合に必要です。 +* [`orjson`](https://github.com/ijl/orjson) - `ORJSONResponse` を使用したい場合に必要です。 +* [`ujson`](https://github.com/esnme/ultrajson) - `UJSONResponse` を使用したい場合に必要です。 ## ライセンス { #license }