コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 8 of about 8 for JavaScript (0.003 sec.)
Configure Swagger UI 13357
Configure Swagger UI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can configure some extra Swagger UI parameters . To configure them, pass the swagger_ui_pa ... the configurations passed to Swagger UI directly. FastAPI converts the configurations to JSON to make them compatible with JavaScript, as that's what Swagger UI needs. Disable Syntax Highlighting For example, you could disable syntax highlighting in Swagge ... lly shown in the browser tab. """ ), ], swagger_js_url : Annotated [ str , Doc ( """ The URL to use to load the Swagger UI JavaScript. It is normally set to a CDN URL. """ ), ] = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui-bundle.js" , swagg ... ld only call this function yourself if you needed to override some parts, for example the URLs to use to load Swagger UI's JavaScript and CSS. Read more about it in the [FastAPI docs for Configure Swagger UI](https://fastapi.tiangolo.com/how-to/configure-s ...
https://man.mtool.work/fastapi/0.115/how-to/configure-swagger-ui/
Custom Docs UI Static Assets (Self-Hosting) 9977
Custom Docs UI Static Assets (Self-Hosting) Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . The API docs use Swagger UI and ReDoc , and each of those need some JavaScript ... ed from a CDN . But it's possible to customize it, you can set a specific CDN, or serve the files yourself. Custom CDN for JavaScript and CSS Let's say that you want to use a different CDN , for example you want to use https://unpkg.com/ . This could be us ... _oauth2_redirect_url here to use the default. swagger_js_url : the URL where the HTML for your Swagger UI docs can get the JavaScript file. This is the custom CDN URL. swagger_css_url : the URL where the HTML for your Swagger UI docs can get the CSS file. ... to your docs at http://127.0.0.1:8000/docs , and reload the page, it will load those assets from the new CDN. Self-hosting JavaScript and CSS for docs Self-hosting the JavaScript and CSS could be useful if, for example, you need your app to keep working ev ...
https://man.mtool.work/fastapi/0.115/how-to/custom-docs-ui-assets/
Static Files - StaticFiles 8983
Static Files - StaticFiles You can use the StaticFiles class to serve static files, like JavaScript, CSS, images, etc. Read more about it in the FastAPI docs for Static Files . You can import it directly from fastapi.staticfiles : from fast ...
https://man.mtool.work/fastapi/0.115/reference/staticfiles/
CORS (オリジン間リソース共有) 8784
CORS (オリジン間リソース共有) CORSまたは「オリジン間リソース共有」 は、ブラウザで実行されているフロントエンドにバックエンドと通信するJavaScriptコードがあり、そのバックエンドがフロントエンドとは異なる「オリジン」にある状況を指します。 オリジ ... で、異なる「オリジン」です。 ステップ そして、ブラウザ上で実行されているフロントエンド ( http://localhost:8080 ) があり、そのJavaScriptが http://localhost で実行されているバックエンドと通信するとします。(ポートを指定していないので、ブラウザはデフォルトの 80 ポ ... ンドがこの異なるオリジン ( http://localhost:8080 ) からの通信を許可する適切なヘッダーを送信すると、ブラウザはフロントエンドのJavaScriptにバックエンドへのリクエストを送信させます。 これを実現するには、バックエンドに「許可されたオリジン」のリストがなければなりま ...
https://man.mtool.work/fastapi/0.115/tutorial/cors/
クッキーパラメータモデル 8278
クッキーパラメータモデル もし関連する 複数のクッキー から成るグループがあるなら、それらを宣言するために、 Pydanticモデル を作成できます。? こうすることで、 複数の場所 で そのPydanticモデルを再利用 でき、バリデーションやメタデータを、すべての ... 義されているクッキーを確認できます: 備考 ブラウザがクッキーを処理し ていますが、特別な方法で内部的に処理を行っているために、 JavaScript からは簡単に操作 できない ことに留意してください。 対話的APIドキュメントUI /docs にアクセスすれば、 パスオペレーション に関 ... ンテーション を確認できます。 しかし、たとえ クッキーデータを入力して 「Execute」をクリックしても、対話的APIドキュメントUIは JavaScript で動作しているためクッキーは送信されず、まるで値を入力しなかったかのような エラー メッセージが表示されます。 余分なクッキー ...
https://man.mtool.work/fastapi/0.115/tutorial/cookie-param-models/
代替ツールから受けたインスピレーションと比較 7681
代替ツールから受けたインスピレーションと比較 何が FastAPI にインスピレーションを与えたのか、他の代替ツールと比較してどうか、そしてそこから何を学んだのかについて。 はじめに FastAPI は、代替ツールのこれまでの働きがなければ存在しなかったでしょ ... ーションを定義したコードから、OpenAPIスキーマを自動的に生成する点。 NestJS (と Angular ) NestJSはAngularにインスパイアされたJavaScript (TypeScript) NodeJSフレームワークで、Pythonですらありません。 Flask-apispecでできることと多少似たようなことを実現しています ... riptの型で記述されるので (Pythonの型ヒントに似ています) 、エディタのサポートはとても良いです。 しかし、TypeScriptのデータはJavaScriptへのコンパイル後には残されないため、バリデーション、シリアライゼーション、ドキュメント化を同時に定義するのに型に頼ることはで ...
https://man.mtool.work/fastapi/0.115/alternatives/
並行処理と async / await 7681
並行処理と async / await path operation 関数 のための async def に関する詳細と非同期 (asynchronous) コード、並行処理 (Concurrency)、そして、並列処理 (Parallelism) の背景について。 急いでいますか? TL;DR: 次のような、 await を使用して呼び出す ... 比較的新しいものです。 非同期コードの操作がはるかに簡単になります。 等価な (またはほとんど同一の) 構文が、最近のバージョンのJavaScript (ブラウザおよびNodeJS) にも最近組み込まれました。 しかし、その前は、非同期コードの処理はかなり複雑で難解でした。 以前のバー ... vent が利用できました。しかし、コードは理解、デバック、そして、考察がはるかに複雑です。 以前のバージョンのNodeJS / ブラウザJavaScriptでは、「コールバック」を使用していました。これは、 コールバック地獄 につながります。 コルーチン コルーチン は、 async def 関 ...
https://man.mtool.work/fastapi/0.115/async/
WebSocket 7482
WebSocket FastAPI で WebSocket が使用できます。 WebSockets のインストール まず WebSockets のインストールが必要です。 $ pip install websockets ---> 100% WebSocket クライアント 本番環境 本番環境では、React、Vue.js、Angularなどの最新のフレーム ... 他にも、WebSocketのエンドポイントと通信する方法があるかもしれません。 ただし、この例では非常にシンプルなHTML文書といくつかのJavaScriptを、すべてソースコードの中に入れて使用することにします。 もちろん、これは最適な方法ではありませんし、本番環境で使うことはない ...
https://man.mtool.work/fastapi/0.115/advanced/websockets/
PREV 1 NEXT