← notes

A Flask app for Costa Rican market data that was never written

Jun 2, 2018

Costa Rican market data as a Flask app.

The idea does not survive contact with the repo. There is 190 bytes of Python here, no market data in any of it, and one of the three routes returns “Hello, World!”.

What exists is the standard Flask package layout: app/__init__.py creates the app and imports app.routes at the bottom of the file, and routes.py imports app back. That trailing import is load-bearing rather than a style quirk, it works because by the last line of __init__.py the app object exists, and moving it to the top fails. Every Flask tutorial has that line and almost none explain it, which is why people copy it and have no model for what broke when they reorganise. The application factory is the version that removes the cycle instead of sequencing around it.

Scaffolded and abandoned the same day.

Started, not pursued.