This file contains helper functions for the feed generator module.

copyright:2013, Lars Kiesow <>
license:FreeBSD and LGPL, see license.* for more details.
feedgen.util.ensure_format(val, allowed, required, allowed_values=None, defaults=None)

Takes a dictionary or a list of dictionaries and check if all keys are in the set of allowed keys, if all required keys are present and if the values of a specific key are ok.

  • val – Dictionaries to check.
  • allowed – Set of allowed keys.
  • required – Set of required keys.
  • allowed_values – Dictionary with keys and sets of their allowed values.
  • defaults – Dictionary with default values.

List of checked dictionaries.


Make sure the locale setting do not interfere with the time format.