Skip to content

Switching to FastAPI instead of flask ? #1

@tlunet

Description

@tlunet

After looking a bit in the API to solve some issues (e.g problem getting files from the doc repository), I wonder if maybe it could be interesting to switch to FastAPI instead of flask :

  • FastAPI was developed especially with the focus on solving some know issues of previous existing tools, and was inspired rom them too to keep their best aspect (simplicity, speed, ... see alternatives and historical nodes).
  • it simplifies the usage and development by providing many tools under the hood (starlette, requests, support for file requests, ...).

In particular, it allows the automated creation of API pages since it does not requires unique names for the routes functions => the app can look at some documentation in a doc folder with some unspecified tree architecture, and create each routes depending on the tree path just like this

for ... in glob.glob('doc/**'):
      
      @app.route('.....')
      def _():
            return htmlPage(....)

This would give use more flexibility for the generation part of the website. There is also some easy-to-use tools to return files (e.g for images) that could also be used like this, allowing to use the markdown structure on the github repository and simply translate it to the website ...

What do you think @MichelKrispin ?
What's your thoughts

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions