Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
396 stars 190 forks source link

[Python Templates ] Better structure for Python FastAPI ToDo Application #1292

Open kshitijcode opened 1 year ago

kshitijcode commented 1 year ago

Describe the bug The Python FastAPI ToDo sample can have an enhanced structure representing closely an MVC application. The structure will help in handling complexity when the code grows with different abstractions and modules.

This will also closely resemble as per FastAPI recommendations: https://github.com/tiangolo/full-stack-fastapi-postgresql/tree/master/%7B%7Bcookiecutter.project_slug%7D%7D/backend/app/app

Attaching the reference :

Screenshot 2022-12-21 at 10 40 10 AM

I can raise the PR for the same.

ellismg commented 1 year ago

Hi @kshitijcode!

We'd be happy to accept a PR. If it was not obvious, the samples are assembled by a tool in the repository called repoman (an app writen in NodeJS) which uses repo.yaml file to stitch together the artifacts into the repository layouts that we eventually push.

jongio commented 1 year ago

@kshitijcode - Please let us know if you'd like to do a PR for this. The source is here: https://github.com/Azure/azure-dev/tree/main/templates/todo/api

pamelafox commented 1 year ago

Please open a PR if you find a nicer architecture that works for the TODO sample.

Alternatively, you could submit a brand new template in the MVC architecture to the Awesome azd templates gallery.

You (or we) could even try to add support to Sebastian's great cookie-cutter sample (the one you linked above).