No description
- Python 100%
| campfire.py | ||
| README.md | ||
campfire
This script autogenerates Flask MethodView resources and Marshmallow Schemas for a project that has a SQLAlchemy declarative model.
Requirements
In addition to flask-smorest, this project also requires the following:
Flask-JWT-Extended- for authenticationFlask-SQLAlchemyMarshmallow-SQLAlchemySQLAlchemy
Expected Project Layout
/project_root
- /package_name
- /models
- /views
- /<collection_name>
- resources.py
- schemas.py
app.py
- pyproject.toml
Assumptions
campfire.pyis placed at theproject_root- The models are importable from
package_name.models - The
SQLAlchemyclass fromFlask-SQLAlchemyis- instantiated
- importable from
package_name.modelsasdb
Usage
Basic usage is simple
$ python campfire.py <package_name>