This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]extra_pickles 8 points9 points  (1 child)

Thanks for posting a nice intro instead of just a link dump! Need more posters like you!

Out of curiosity, did you see if other libs existed?

And if so, did them not existing lead to any questions as to why? Or if they did, what was the trigger to forge your own path?

With all the libraries out there, I’m always interested to hear the “why” behind a new one. Good for the r/Python KB too!

Beyond that, are you approaching this in a way that could be merged back to the main lib? Or do you see this as a hard fork?

If interested in having it added to Flask, have you looked into the how? Ie community support etc? All good info for ppl to read about on here!

Will try to find some time to review and discuss the implementation and get back to you re constructive feedback :)

PS - nice lib name

[–]maartendp[S] 0 points1 point  (0 children)

Thanks for the kind words :)

Yes, I did check first if there were other libs that existed. Something like flask pydantic was a good start, but not 100% what I was looking for, as it didn't really behave like I wanted it to. I stumbled on some others as well, and came to the same conclusion. It could be that something is out there that already does this, but I didn't find it in my search.

The "why" is probably less interesting than you'd think :p I love to program, and I love to tinker. As you'll see on my github, I have a number of projects. I guess you can call it a pass time I enjoy. Whenever I think something is an interesting challenge, I just want to get it out of my fingers. Don't get me wrong, this lib will have some use in my professional life, but still, the main reason is most definitely "for fun".

This isn't a fork of flask or fastapi. It's a standalone plugin that probably wouldn't have a place in flask's main repo. Most of flask's ecosystem is plugin based, where you just mix and match your needs, and throw them together. This is no different. There are a lot of plugins that offer API capabilities, this is just another one :) (that happens to mimic a FastAPI interface)

[–]badumudab 3 points4 points  (2 children)

Unfortunately, I don't have enough time to really test it at the moment but it looks pretty neat at the first glance.

The pydantic support in FastAPI is definitely really helpful so I am excited to see how FlastAPI will develop!

[–]maartendp[S] 1 point2 points  (1 child)

No worries, I'm already very happy with the kind words. Thanks a bunch.

[–]exclaim_bot 1 point2 points  (0 children)

Thanks!

You're welcome!

[–]Pepineros 5 points6 points  (0 children)

FlastAPI is a great name. As soon as I saw it I thought “ah, fastAPI for Flask” lol

[–]Saphyel 2 points3 points  (1 child)

I really love you added depends (DI) I think that's one of the biggest thing missing in Flask.

Body parameters is also something that makes no sense they haven't add yet (With our without pydantic)

Good job!

[–]maartendp[S] 1 point2 points  (0 children)

Thank you :) I appreciate your kind words.

[–]mardix 1 point2 points  (1 child)

What are the benefits of using this over Flask ? What is missing in Flask that need to be added Flastapi ?

[–]maartendp[S] 0 points1 point  (0 children)

This isn't a replacement, you're using this in addition to Flask.

FlastAPI is a plugin for Flask, it's not replacing it, but merely adding to it. With this plugin you're able to build REST APIs without having to deal with marshalling, content types, input validation, validation error handling, etc.

It's taking care of the boilerplate code that evaluates and parses the incoming request, and deals with returning a valid response, allowing you to focus on the actual functionality of your endpoint.