Interface¶

This module has the primary public-facing methods for the project.

get_penalty_model(specification, database=None)[source]

Factory function for penaltymodel_cache.

Parameters: specification (penaltymodel.Specification) – The specification for the desired penalty model. database (str, optional) – The path to the desired sqlite database file. If None, will use the default. priority (int) – 100 Penalty model with the given specification. penaltymodel.PenaltyModel penaltymodel.MissingPenaltyModel – If the penalty model is not in the cache.
cache_penalty_model(penalty_model, database=None)[source]

Caching function for penaltymodel_cache.

Parameters: penalty_model (penaltymodel.PenaltyModel) – Penalty model to be cached. database (str, optional) – The path to the desired sqlite database file. If None, will use the default.