Results of 1 - 10 of about 13 for automatic (0.002 sec.)
- Sub Applications - Mounts 12897
- 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
...( "/sub" ) def read_sub (): return { "message" : "Hello World from sub API" } app . mount ( "/subapi" , subapi ) Check the automatic API docs Now, run the fastapi command with your file: $ fastapi dev main.py <span style="color: green;">INFO</span>: Uvico...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 automatic API docs for the main app, including only its own path operations : And then, open the docs for the sub-application, at ht...tp://127.0.0.1:8000/subapi/docs . You will see the automatic API docs for the sub-application, including only its own path operations , all under the correct sub-path prefix /subapi :... - https://man.mtool.work/fastapi/0.115/advanced/sub-applications/
- OpenAPI docs 10733
- OpenAPI docs Utilities to handle OpenAPI automatic UI documentation, including Swagger UI (by default at /docs ) and ReDoc (by default at /redoc ). ::: fastapi.openapi.docs.get_swagger_ui_html ::: fastapi.openapi.docs.get_redoc_html ::: fas
... - https://man.mtool.work/fastapi/0.115/reference/openapi/docs/
- Custom Docs UI Static Assets (Self-Hosting) 10451
- 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 Jav
...o use https://unpkg.com/ . This could be useful if for example you live in a country that restricts some URLs. Disable the automatic docs The first step is to disable the automatic docs, as by default, those use the default CDN. To disable them, set their...files for the docs in the correct place. Now we can configure the app to use those static files for the docs. Disable the automatic docs for static files The same as when using a custom CDN, the first step is to disable the automatic docs, as those use t... - https://man.mtool.work/fastapi/0.115/how-to/custom-docs-ui-assets/
- Security Tools 9642
- Security Tools When you need to declare dependencies with OAuth2 scopes you use Security() . But you still need to define what is the dependable, the callable that you pass as a parameter to Depends() or Security() . There are multiple tool
...s that you can use to create those dependables, and they get integrated into OpenAPI so they are shown in the automatic docs UI, they can be used by automatically generated clients and SDKs, etc. You can import them from fastapi.security : fr... - https://man.mtool.work/fastapi/0.115/reference/security/
- Using the Request Directly 8832
- Using the Request Directly Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . Up to now, you have been declaring the parts of the request that you need with their typ
...s. Cookies. etc. And by doing so, FastAPI is validating that data, converting it and generating documentation for your API automatically. But there are situations where you might need to access the Request object directly. Details about the Request object...Request object directly (for example, read the body) it won't be validated, converted or documented (with OpenAPI, for the automatic API user interface) by FastAPI. Although any other parameter declared normally (for example, the body with a Pydantic mode... - https://man.mtool.work/fastapi/0.115/advanced/using-request-directly/
- Bigger Applications - Multiple Files 8832
- Bigger Applications - Multiple Files Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . If you are building an application or a web API, it's rarely the case that you
...They will be marked with a list of tags that contain a single string "items" . These "tags" are especially useful for the automatic interactive documentation systems (using OpenAPI). All of them will include the predefined responses . All these path oper...nd "mount" them independently of the rest, the path operations are "cloned" (re-created), not included directly. Check the automatic API docs Now, run your app: $ fastapi dev app/main.py <span style="color: green;">INFO</span>: Uvicorn running on http://1...27.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 automatic API docs, including the paths from all the submodules, using the correct paths (and prefixes) and the correct tags: Includ... - https://man.mtool.work/fastapi/0.115/tutorial/bigger-applications/
- Behind a Proxy 8551
- 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
...tp://127.0.0.1:9999/api/v1/docs it would look like: Tip The docs UI will interact with the server that you select. Disable automatic server from root_path If you don't want FastAPI to include an automatic server using the root_path , you can use the param... - https://man.mtool.work/fastapi/0.115/advanced/behind-a-proxy/
- OpenAPI Webhooks 8551
- OpenAPI Webhooks Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . There are cases where you want to tell your API users that your app could call their app (sending
.../" ) def read_users (): return [ "Rick" , "Morty" ] The webhooks that you define will end up in the OpenAPI schema and the automatic docs UI . Info The app.webhooks object is actually just an APIRouter , the same type you would use when structuring your a... - https://man.mtool.work/fastapi/0.115/advanced/openapi-webhooks/
- Generate Clients 8287
- Generate Clients Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . As FastAPI is based on the OpenAPI specification, you get automatic compatibility with many tools,
...including the automatic API docs (provided by Swagger UI). One particular advantage that is not necessarily obvious is that you can generate clien...client, you would now have clean method names , with all the autocompletion , inline errors , etc: Benefits When using the automatically generated clients you would get autocompletion for: Methods. Request payloads in the body, query parameters, etc. Resp...ld be reflected on the generated code. ? This also means that if something changed it will be reflected on the client code automatically. And if you build the client it will error out if you have any mismatch in the data used. So, you would detect many er... - https://man.mtool.work/fastapi/0.115/advanced/generate-clients/
- Development - Contributing 7478
- 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
...n to coordinate translations for your language. You can subscribe to it, and when there's a new pull request to review, an automatic comment will be added to the discussion. If you translate pages, add a single pull request per page translated. That will... - https://man.mtool.work/fastapi/0.115/contributing/