3 Structure of the PyMinder Application
Zac Adam-MacEwen edited this page 2021-01-20 12:16:44 -04:00

This should be documented more fully as things actually get built. Structure subject to change until 1.0, and future functionality should be added as new subpackages or python files in existing subpackages rather than simply bolting functions into existing packages, except as absolutely needed. Breaking the project up like this makes it easier to collaborate with other developers without overlapping each other's work.

Pyminder is a package containing several subpackages:

  • pyminder.screendriver, itself containing:
    • pyminder.screendriver.driver.py, the bulk code which writes to screen.
    • pyminder.screendriver.textparser.py, the code that handles writing and scrolling text to screen.
  • pyminder.service, the necessary tooling for a flask-based restful API to handle incoming status messages,
  • pyminder.helpers, exposing various helper utilities for other processes to use to interact with pyminder/service
  • pyminder.runtime.py, which is the master minder responsible for:
    • Bringing up (and if necessary intializing) the database
    • Bringing up pyminder.service
    • Running as a background process to interrogate the pyminder.service for status messages and display them on the GFX HAT.
    • Running as a background process to interrogate the GFX HAT for input events
    • Negotiating the process of acknowledging/clearing messages.

The three items at the buttom of runtime.py should be independantly launchible. Perhaps a seperate module named pyminder.client.py?