Fastapi: [QUESTION] Is there a better way to navigate the docs?

Created on 10 Jan 2020  路  6Comments  路  Source: tiangolo/fastapi

Hello and thank you for the awesome framework!

I'm trying to get started by converting my small Flask API to using FastAPI and seem to be struggling to answer some simple questions. I seem to be butting up against how the docs are laid out as most of the time I'm used to somewhere there being a more class based view of a framework with "here's the properties and methods they have and what they do" thing. The Tutorial - User Guide section is great but a littler verbose when I'm just trying to find one small thing. Am I looking in the wrong spot?

Thanks!

question

All 6 comments

If what you are looking for is something more akin to traditional API docs, I don't think such a thing currently exists.

I'd be curious about what @tiangolo thinks of the idea.

In general, if you ignore the decorator indirection and repeatedly defined decorators for each method (i.e., app.get, app.post, etc.), FastAPI is surprisingly concise, so it might make sense to just clone the repo and use the source code as your reference.

(And to be clear, there is a good reason for all the extra lines of mostly-repeated decorator code -- it is necessary to get both type-safety and a convenient API).

Having a more traditional API docs would be lovely :) For now I'll need to do a combination of what you suggested and doing searches on the repo to find what I need.

Thanks.

I asked this question almost a month ago and got no reply. See #804

Ah I somehow missed your ticket. I would have added a comment to that otherwise.

This does seem to be a glaring issue for all parties concerned. The friction it creates just to try and "quickly" find what something does or what parameters mean what is rather important. Wondering how high on everyone's priority list this is to fix.

Yep, the same answer as in #804. Yes, we want them, but first I have to clean up some of the parameters, define a docstring style, and add docstrings everywhere. :sweat_smile:

In that case I'll close this ticket and just keep an eye on #804 :) Thanks for the reply!

Was this page helpful?
0 / 5 - 0 ratings