fietsboek.updater.script module

Base class definition for update scripts.

class fietsboek.updater.script.UpdateScript

Bases: object

Base class for update scripts.

This class provides stub methods for the update script hooks as well as methods for user interaction.

post_alembic(config)

Script that is run after the alembic migrations have been run.

This method is to be overridden by subclasses.

Parameters:

config (dict) – The app configuration.

pre_alembic(config)

Script that is run before the alembic migration is run.

This method is to be overridden by subclasses.

Parameters:

config (dict) – The app configuration.

tell(text)

Output a message to the user.

This function should be used in update scripts instead of print() to ensure the right stream is selected.

Parameters:

text (str) – The text to show to the user.