API Documentation

  • The cool thing about FastAPI is that it's self documenting

  • Meaning that you don't have to create any sort of API documentation

  • This is done by using Swagger UI

  • And is accessed by using the base ROOT URL with /docs

Example:

http://127.0.0.1:8000/docs
  • It redirects you to a page with all the documentation

  • Additionally this also allows you to see what is required to run the query successfully and try it out from the documentation itself

  • There is an alternative documentation tool as well called Redoc

  • This can be accessed by using the base URL + /redoc

http://127.0.0.1:8000/redoc

Last updated