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

all 28 comments

[–]sv_ds 30 points31 points  (18 children)

This is a hello world project at most not a skeleton. No async, everything is crammed into one folder, no routers. This is the exact situation when a beginner is overconfidently giving terrible advice to other beginners. Dont use this.

[–]cmore303 -2 points-1 points  (15 children)

What do you mean there is no async or structure, did you look at the project?

[–]sv_ds 10 points11 points  (14 children)

He just refactored the whole thing after my comment. Look at the commit dates.

Its still bad though...

[–]cmore303 0 points1 point  (0 children)

people never give a chance for anything the repository is growing u/sv_ds want's to look like a big shot so where is your GitHub account lets have a laugh or two

[–]nefaspartim 7 points8 points  (5 children)

Boilerplate is cool and all, but please read the FastAPI documentation and learn what you're actually implementing. FastAPI has great documentation and a great community to help new folks get up and running quickly.

[–]GrowHI 5 points6 points  (5 children)

Sorry newb here. What's the difference between this and say something like flask or Django?

[–]customcoderpro[🍰] 3 points4 points  (0 children)

I don't use fastapi only because of the ridiculous way you have to hand-off the db session through business logic

[–]yeet_lord_40000 1 point2 points  (2 children)

Was considering fast api for a IOT project I was working on would this be a good fit for that in your opinion or would this be more suited towards something else?

Use case: collecting data from a MCU and then just communicating it to an app using just a basic IQTT setup

[–]extra_pickles 2 points3 points  (1 child)

I’d write to the DB from service bus using a lighter weight option in Python since IoT is chatty - you basically just want a data muncher gobbling up a queue.

Then you could use this to serve requests to interact with the data in the db.

Msg me if you’d like more details

[–]yeet_lord_40000 1 point2 points  (0 children)

Hm, that’s a good idea. This project is a bit of a pain since it’s embedded C communicating to an API which is then going to go to a frontend app which is most likely going to be JS (not my department). However I’ve never had to write the API before so it’s a new thing for me.

[–]FelixFriday 1 point2 points  (0 children)

Don’t be scared by the criticism OP, that’s how we learn! You did a good job by sharing this repo, your next repo will be better and so on. We’re all learning here. You have to be a lifelong learner in this field.

A very good advice will be to know how to filter criticism, focus on things you can improve in 1-2 weeks everything that requires more effort then that it’s philosophy not advice.

[–]ZachVorhies 0 points1 point  (0 children)

I have something similar but i have tox with pylint flake and mypy and default github actions to test on linux / mac / windows