The obligatory tech stack post!
- Flask, in Python 3
- PostgreSQL (aka Postgres)
- SQLAlchemy (via Flask-SQLAlchemy)
- Amazon Elastic Beanstalk and RDS
The job of the server is mainly to serve JSON via a REST API, and much of the front end was developed before a single line of the server was written. I decided very quickly that the server’s model tier should return ‘JSON objects’ (raw dicts and arrays) rather than objects mapped by the SQLAlchemy ORM. This helps to keep logic out of the view tier and would make any future move to microservices very much more straightforward. So far I’ve not regretted this slightly unusual move one bit.
One level below that, the persistence model is “mostly relational”. Two fields are stored as JSON; later (it’s not needed quite yet) they’ll be expanded into relational tables for reporting purposes. One quite complex object—the assessment template—is kept for now in a YAML file (served as JSON) until I implement template editing.
Basically, Python and PostgreSQL work for me just fine. You may remember that some time back I was an occasional contributor to the Pylons web framework but I never made the transition to its successor, Pyramid. I’m new to Flask but my needs are modest and it has been very easy to learn. My SQLAlchemy isn’t where it was five years ago, but it’s returning!
One likely casualty is the SVG. I have plans to replace Agendashift’s rather unique style of circular chart with regular bar charts, and I expect to be able to implement them in CSS.