Ask HN: Examples of good project structure for non-trivial Python RESTful APIs?

3 points by prdonahue ↗ HN
Looking for some good examples of an API-only Python application (i.e., excluding forms, etc.) that has well defined/strongly opinionated project structure. Ideally includes some or all of SQLAlchemy, Flask-Restful, Marshmallow, and Alembic for database migrations.

1 comment

[ 2.6 ms ] story [ 12.4 ms ] thread
Good, non-trivial, and RESTful -- pick two. REST doesn't define any sane way of reporting execution errors (and no, smashing errors in execution layer into transport layer, i.e. HTTP codes, is not a sane way).

The only good way to use REST is to use it as it was intended: for applications employing only trivial CRUD model. Trying anything above that calls for RPC.