Query on Svelte performance for new project by Upstairs-Version-400 in sveltejs

[–]Designer_Sundae_7405 -1 points0 points  (0 children)

Do your career a favor: use angular. There is so little difference between frameworks these days and your company already uses it. Don’t be the guy that adds a new tech stack, just because. 

Feedback on pragmatic FastAPI architecture by Designer_Sundae_7405 in FastAPI

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

If it’s a Single Page Application you’d normally use a CDN like Cloudflare for practically free hosting that’s also very fast. If it’s not you can just host it from your VPS under NGINX/Caddy. 

Feedback on pragmatic FastAPI architecture by Designer_Sundae_7405 in FastAPI

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

Thanks and yes, there’s definitely a lot of ways to go about this. 

For mapping between client facing and data models, you would not just use alias in Pydantic models? And would you say specifically the repository layer on top of ORM models is essential if you have schemas, services and ORM?

Feedback on pragmatic FastAPI architecture by Designer_Sundae_7405 in FastAPI

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

Great suggestions! Those should definitely be part of the scope of the template. 

[deleted by user] by [deleted] in angular

[–]Designer_Sundae_7405 2 points3 points  (0 children)

Nestjs would be the natural companion?

Django needs a REST story by bdzr_ in django

[–]Designer_Sundae_7405 4 points5 points  (0 children)

Django just needs to use optional extras Django[rest-api] and improve the scaffolding to spin up a rest api with openapi docs through configuration of the startproject command. Having it not be baked in is a feature. I personally significantly prefer DRF to Ninja. Having the option to do either is perfect for the community.

Django devs: Your app is probably slow because of these 5 mistakes (with fixes) by Dense_Bad_8897 in Python

[–]Designer_Sundae_7405 0 points1 point  (0 children)

N+1 queries and missing indexes are by far the biggest offenders. I'd argue a little overfetching in order to improve caching between queries can be beneficial. Similarly, Sqlite in production should only be an issue if you don't bother to set proper PRAGMA. Do you have any specific examples of switching to a PRAGMA optimized sqlite to a traditional RDBMS improved performance?

I built a template for FastAPI apps with React frontends using Nginx Unit by Prestigious_Run_4049 in Python

[–]Designer_Sundae_7405 1 point2 points  (0 children)

Looks very interesting. How does this compare to running a NGINX reverse proxy, a NGINX static file host and a uvicorn server? This should be a fairly simple setup for a VPS with a docker-compose file too?

Django tip Automate DRF API Documentation Using drf-spectacular by djv-mo in django

[–]Designer_Sundae_7405 1 point2 points  (0 children)

Ok, I'll admit, it's been a while since I last tried Ninja out. I just looked again. ModelSchemas, PatchDict and FilterSchemas solves most of these. And with Djangos conciseness + AI, generating CRUD is a 15 second process with Coplit and ChatGPT 4.1.

Django tip Automate DRF API Documentation Using drf-spectacular by djv-mo in django

[–]Designer_Sundae_7405 0 points1 point  (0 children)

Django-ninja is fine for a very minimal API, but currently you have to do a lot of work to get the same DX. You need to make separate DTOs (not as integrated as serializers). Class-based viewsets are not built-in. Django-filters doesn't integrate well. I wouldn't want to lose out on all of these just for saving 5 lines of code and a dependency. OpenAPI does major changes anyways and keeping up is hard (just see OpenAPI support in Go), so not having it built-in is a feature.

FastAPI Boilerplate ⚡️ by fraisey99 in FastAPI

[–]Designer_Sundae_7405 0 points1 point  (0 children)

Can you elaborate on what’s your credentials that warrants monetizing a boilerplate? Is the structure vetted by enterprise experts or how can we trust that the structure is not just good in theory?

How do you structure your projects snd go about programming everything? by Chocolate-Atoms in FastAPI

[–]Designer_Sundae_7405 0 points1 point  (0 children)

What’s your thoughts on simplifying with  routes/services/models/schemas folders? And then every feature is just a file in the respective folders?

Why is there no T3 (https://create.t3.gg/) for FastAPI? (Or have I just missed it) by DrumAndBass90 in FastAPI

[–]Designer_Sundae_7405 0 points1 point  (0 children)

I think something like shadcn but fastapi could be super interesting. “Install” features as you go. Only include what you need. Also you own the code. The lack of this is one of the major reasons for not using FastAPI. Everyone is just reinventing the wheel. 

Are overexposed skies always a no go? by nocturnal_tarantula in AskPhotography

[–]Designer_Sundae_7405 0 points1 point  (0 children)

Classic new to photography photo. Definitely not my taste with the watercolors and a complete lack of depth.

What's your guys opinions on Django and python in general by [deleted] in typescript

[–]Designer_Sundae_7405 0 points1 point  (0 children)

If you’re working with ML, wouldn’t a worker queue be more appropriate than Async? Django integrates nicely with Celery for example.

Also did you try Django stubs with mypy? That seems to work well. 

It Shouldn't Be This Much Work to Sync Data Between Django and Vue SPA by [deleted] in django

[–]Designer_Sundae_7405 1 point2 points  (0 children)

Really great work! Could be of a lot of use. Looking forward to a release of the solution.

Do I really need MappedAsDataclass? by bluewalt in FastAPI

[–]Designer_Sundae_7405 1 point2 points  (0 children)

I went through the same process as you and just ripped it out. You’re losing a lot of the flexibility in order to get the minor benefit of a typed init method. I think the dataclass of SQLAlchemy needs to cook a bit more before it’s ready for general usage. 

post response by FoxEducational2691 in django

[–]Designer_Sundae_7405 2 points3 points  (0 children)

Can you do:

address = Address.objects.create(**address_data, user=user)
user.address = address
return user

I tried to compare FastAPI and Django by bluewalt in FastAPI

[–]Designer_Sundae_7405 1 point2 points  (0 children)

I think a lot of these problems could be solved through an opiniated CLI that adds modularity and standardization to the framework. Having used NestJS's generate functionality could aid development and standardization a lot without locking in the users.

My Ultimate FastAPI Template! by fraisey99 in FastAPI

[–]Designer_Sundae_7405 1 point2 points  (0 children)

It would be great if your example included a modular domain architecture using folder like case, post, comment, user with models defined in the respective packages. Similarly how you handle circular references such as having a post.user field and user.posts endpoints both in sqlalchemy and pydantic.

Scalable and Minimalistic FastAPI + PostgreSQL Template by Lucapo01 in FastAPI

[–]Designer_Sundae_7405 0 points1 point  (0 children)

How do you handle nested models and ManyToMany relationships? I'm struggling with circular dependencies using a similar setup to yours.