6
KasperNS
78d

I've decided that I want to make a REST API using Flask/Python. I've researched it for a few days, but can't seem to find anything close to a definitive answer: How should I structure the application?

I've found a lot of people talking about using Blueprints, and I'm leaning towards that, but I'm wondering if there aren't "better" frameworks for building a REST API? What do people here recommend that I look into?

Comments
  • 2
    Are there better frameworks? Of course there are, and not only from a subjective point of view, but a performant as well. Chances are one ain't building the next FB so a Flask API backend is good enough. In this case I can really recommend structuring through blueprint based configurations using the flask api extension. It works really good. You could also make it with django and django rest. Graphene with django is currently my preference for it since i don't like coding everything from scratch in flask.

    Flask is still an absolute excellent choice :D
  • 1
    @AleCx04 What are better frameworks?
  • 1
    @norman70688 better frameworks are frameworks that work better. Or do you mean you want me to provide examples?
  • 1
    @AleCx04 Examples yes :D
  • 3
    @norman70688 certainly. Keep in mind that I believe python to be an absolutely excellent tool(despite my hatred for synctactic whitespace):

    .NET Core MVC REST
    Spring Boot
    Django-Rest
    Django Graphene
    Python Vibora(async goodness)
    Adonis
    Nest
    Fasthttp
    Swoole
    Rails REST
    Compojure & Ring combo
    Elixir Phoenix <--- this some bomb shit

    My current favorites are the Compojure and Ring combo for Clojure and Elixir with Phoenix.

    Most of these were selected for their performance and structure, not because i think they are superior as languages. Extensions and packages count as well as ease of use.
  • 2
    @AleCx04 You have been using/working with all of those?
  • 2
    @norman70688 all of them worked with in one way or another either by existing project(professionally) or by my own selection(Spring Boot, Compojure & Ring, django graphene and djando rest)

    The others i have worked with other people as support.

    The only one I have not been able to use professionally is Phoenix ;____;
  • 1
    Another vote for .NET Core MVC. Extremely fast and easy to develop on.
  • 1
    +1 .NET Core
  • 0
    I find Flask and Python in general to be easy to experiment with. The structuring is mostly up to you, which can be fun at times.

    If you're looking for well defined structuring then I'd recommend .NET MVC or Spring Boot.
Your Job Suck?
Get a Better Job
Add Comment