Results of 1 - 10 of about 20 for running (0.002 sec.)
- Behind a Proxy 12235
- Behind a Proxy Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . In some situations, you might need to use a proxy server like Traefik or Nginx with a configuration
...s example, the "Proxy" could be something like Traefik . And the server would be something like FastAPI CLI with Uvicorn , running your FastAPI application. Providing the root_path To achieve this, you can use the command line option --root-path like: $...fastapi run main.py --root-path /api/v1 <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) If you use Hypercorn, it also has the option --root-path . Technical Detai...hen, if you start Uvicorn with: $ fastapi run main.py --root-path /api/v1 <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) The response would be something like: { "message" : "Hello World" , "root_... - https://man.mtool.work/fastapi/0.115/advanced/behind-a-proxy/
- FastAPI CLI 11725
- FastAPI CLI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . FastAPI CLI is a command line program that you can use to serve your FastAPI app, manage your FastAPI p
...id">http://127.0.0.1:8000/docs</u></font> <span style="background-color:#007166"><font color="#D3D7CF"> tip </font></span> Running in development mode, for production use: <b>fastapi run</b> Logs: <span style="background-color:#007166"><font color="#D3D.../awesomeapp'</font><b>]</b> <span style="background-color:#007166"><font color="#D3D7CF"> INFO </font></span> Uvicorn running on <font color="#729FCF"><u style="text-decoration-style:solid">http://127.0.0.1:8000</u></font> <b>(</b>Press CTRL+C to q...api run instead. ? Internally, FastAPI CLI uses Uvicorn , a high-performance, production-ready, ASGI server. ? fastapi dev Running fastapi dev initiates development mode. By default, auto-reload is enabled, automatically reloading the server when you ma... - https://man.mtool.work/fastapi/0.115/fastapi-cli/
- 手動デプロイ 11215
- 手動デプロイ FastAPI を手動でデプロイすることもできます。 以下の様なASGI対応のサーバをインストールする必要があります: Uvicorn Uvicorn , uvloopとhttptoolsを基にした高速なASGIサーバ。 $ pip install "uvicorn[standard]" ---> 100% 豆知識 standar
...いで下さい: Uvicorn Hypercorn $ uvicorn main:app --host 0 .0.0.0 --port 80 <span style="color: green;">INFO</span>: Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit) $ hypercorn main:app --bind 0 .0.0.0:80 Running on 0.0.0.0:8080 over http (CTR... - https://man.mtool.work/fastapi/0.115/deployment/manually/
- 最初のステップ 10689
- 最初のステップ 最もシンプルなFastAPIファイルは以下のようになります: Python 3.8+ from fastapi import FastAPI app = FastAPI () @app . get ( "/" ) async def root (): return { "message" : "Hello World" } これを main.py にコピーします。 ライブサ
...ーバーを実行します: $ uvicorn main:app --reload <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) <span style="color: green;">INFO</span>: Started reloader process [28720]...うに記述される)。 --reload : コードの変更時にサーバーを再起動させる。開発用。 出力には次のような行があります: INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) この行はローカルマシンでアプリが提供されているURLを示しています。 チェック...はコマンドで uvicorn が参照するものと同じです: $ uvicorn main:app --reload <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) 以下のようなアプリを作成したとき: Python 3.8+ from fastapi import FastAPI... - https://man.mtool.work/fastapi/0.115/tutorial/first-steps/
- Development - Contributing 10179
- Development - Contributing Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . First, you might want to see the basic ways to help FastAPI and get help . Developing If
...to test every change. Technical Details This only happens when you install using this included requirements.txt instead of running pip install fastapi directly. That is because inside the requirements.txt file, the local version of FastAPI is marked to...ame time If you run the examples with, e.g.: $ fastapi dev tutorial001.py <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) as Uvicorn by default will use the port 8000 , the documentation on port 8...generates the final output at ./site/ . Then you can serve that with the command serve : // Use the command "serve" after running "build-all" $ python ./scripts/docs.py serve Warning: this is a very simple server. For development, use mkdocs serve inst... - https://man.mtool.work/fastapi/0.115/contributing/
- Lifespan Events 8904
- Lifespan Events Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can define logic (code) that should be executed before the application starts up . This means t
...ld load it at the top level of the module/file, but that would also mean that it would load the model even if you are just running a simple automated test, then that test would be slow because it would have to wait for the model to load before being abl...utdown would happen when you are stopping the application. Maybe you need to start a new version, or you just got tired of running it. ? Lifespan function The first thing to notice, is that we are defining an async function with yield . This is very sim... - https://man.mtool.work/fastapi/0.115/advanced/events/
- Sub Applications - Mounts 8377
- Sub Applications - Mounts Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . If you need to have two independent FastAPI applications, with their own independent Open
...I docs Now, run the fastapi command with your file: $ fastapi dev main.py <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) And open the docs at http://127.0.0.1:8000/docs . You will see the automat... - https://man.mtool.work/fastapi/0.115/advanced/sub-applications/
- Async Tests 8122
- Async Tests Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You have already seen how to test your FastAPI applications using the provided TestClient . Up to now,
...unctions, using standard pytest. But that magic doesn't work anymore when we're using it inside asynchronous functions. By running our tests asynchronously, we can no longer use the TestClient inside our test functions. The TestClient is based on HTTPX... - https://man.mtool.work/fastapi/0.115/advanced/async-tests/
- 条件付き OpenAPI 8122
- 条件付き OpenAPI 必要であれば、設定と環境変数を利用して、環境に応じて条件付きでOpenAPIを構成することが可能です。また、完全にOpenAPIを無効にすることもできます。 セキュリティとAPI、およびドキュメントについて 本番環境においてドキュメントのUIを
...メントを含む) を無効化することができます。 $ OPENAPI_URL = uvicorn main:app <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) すると、以下のように /openapi.json , /docs , /redoc のどのURLにアクセスして... - https://man.mtool.work/fastapi/0.115/how-to/conditional-openapi/
- チュートリアル - ユーザーガイド 8122
- チュートリアル - ユーザーガイド このチュートリアルは FastAPI のほぼすべての機能の使い方を段階的に紹介します。 各セクションは前のセクションを踏まえた内容になっています。しかし、トピックごとに分割されているので、特定のAPIの要求を満たすようなト
...ルにコピーし、 uvicorn を次のように起動します: $ uvicorn main:app --reload <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) <span style="color: green;">INFO</span>: Started reloader process [28720]... - https://man.mtool.work/fastapi/0.115/tutorial/