marshmallow-code / marshmallow-code/flask-marshmallow
Better Separation of Duties
- Dominant language
- Python
- Stars
- 887
- Forks
- 65
- Avg merge
- 7h 25m
- Merged PRs (30d)
- 3
Description
Hi Team - Love the repo and thank you. As you can imagine, once you begin to create larger and larger applications, the number of routes, models and schemas begin to increase, and become increasingly complex. Could you refactor your code to show how you would recommend separating your Marshmallow/SQLAlchemy Models from the main Flask app/routes? Right now you're instantiating the marshmallow object (`ma`) inside the main `app.py` file and then creating Marshmallow schemas below it. When you start having dozens or more tables/models this becomes unwieldy and increases the blast radius of app.py.
Thanks!
Contributor guide
Research direction
Start by reading app.py and tracing where the Flask routes, Marshmallow object, SQLAlchemy models, and schemas are currently defined. The change is complete when the repository demonstrates a clear separation between the main app/routes and the models and schemas, without the issue specifying particular tests to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlalchemy
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100