-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
IMHO, the current layout is not very practical for adding new / removing resources, therefore I would like to suggest differently pivoted organization of code.
I think most people will continue from this cookiecutter by adding / removing resources like Items and Users.
Example usecase
Lets say that apart from Users and Items you want to add Ideas to your app.
Currently you need to visit each directory: api, crud, db, db_models, tests/* and add the file named idea(s).py.
Maybe you start to think that the Ideas are better and you want to get rid of Items now...
Suggested layout
-
/users/
- __init__.py
- model.py
- db.py
- api.py
- crud.py
- utils.py
-
/items/
- __init__.py
- model.py
- db.py
- api.py
- crud.py
-
/tokens/
- ...
-
testsshould be structured analogically
I am not yet sure how other parts should be layed out, but I would try to squash remaining files in now almost empty subpackages to core.
What do you think?