Results of 1 - 6 of about 6 for argument (0.002 sec.)
- Advanced Middleware 12649
- Advanced Middleware Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . In the main tutorial you read how to add Custom Middleware to your application. And then you al
...long as it follows the ASGI spec. In general, ASGI middlewares are classes that expect to receive an ASGI app as the first argument. So, in the documentation for third-party ASGI middlewares they will probably tell you to do something like: from unicorn...d_middleware ( UnicornMiddleware , some_config = "rainbow" ) app.add_middleware() receives a middleware class as the first argument and any additional arguments to be passed to the middleware. Integrated middlewares FastAPI includes several middlewares f...xample.com" , "*.example.com" ] ) @app . get ( "/" ) async def main (): return { "message" : "Hello World" } The following arguments are supported: allowed_hosts - A list of domain names that should be allowed as hostnames. Wildcard domains such as *.exa... - https://man.mtool.work/fastapi/0.115/advanced/middleware/
- Development - Contributing 9852
- 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
...docs/en/ . Now run the live server for the docs in Spanish: // Use the command "live" and pass the language code as a CLI argument $ python ./scripts/docs.py live es <span style="color: green;">[INFO]</span> Serving on http://127.0.0.1:8008 <span style=...is to run the script to generate a new translation directory: // Use the command new-lang, pass the language code as a CLI argument $ python ./scripts/docs.py new-lang ht Successfully initialized: docs/ht Now you can check in your code editor the newly c... - https://man.mtool.work/fastapi/0.115/contributing/
- Configure Swagger UI 9468
- 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
...rameters argument when creating the FastAPI() app object or to the get_swagger_ui_html() function. swagger_ui_parameters receives a dictiona.../body> </html> """ return HTMLResponse ( content = html ) You can override any of them by setting a different value in the argument swagger_ui_parameters . For example, to disable deepLinking you could pass these settings to swagger_ui_parameters : Pytho... - https://man.mtool.work/fastapi/0.115/how-to/configure-swagger-ui/
- 依存関係としてのクラス 7878
- 依存関係としてのクラス 依存性注入 システムを深く掘り下げる前に、先ほどの例をアップグレードしてみましょう。 前の例の dict 前の例では、依存関係("dependable")から dict を返していました: Python 3.8+ - non-Annotated from typing import Union fr
...れませんが)を持っていて、それを次のように「呼び出す」(実行する)ことができるとします: something () または something ( some_argument , some_keyword_argument = "foo" ) これを「呼び出し可能」なものと呼びます。 依存関係としてのクラス Pythonのクラスのインスタ... - https://man.mtool.work/fastapi/0.115/tutorial/dependencies/classes-as-dependenci...
- OpenAPI Callbacks 7476
- OpenAPI Callbacks Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You could create an API with a path operation that could trigger a request to an external API cre
...ck_url query parameter uses a Pydantic Url type. The only new thing is the callbacks=invoices_callback_router.routes as an argument to the path operation decorator . We'll see what that is next. Documenting the callback The actual callback code will depe... - https://man.mtool.work/fastapi/0.115/advanced/openapi-callbacks/
- Virtual Environments 7476
- Virtual Environments Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . When you work in Python projects you probably should use a virtual environment (or a similar m
...fault, uv will create a virtual environment in a directory called .venv . But you could customize it passing an additional argument with the directory name. That command creates a new virtual environment in a directory called .venv . .venv or other name... - https://man.mtool.work/fastapi/0.115/virtual-environments/
PREV
1
NEXT