concrete.util.metadata module

concrete.util.metadata.datetime_to_timestamp(dt)

Source: http://stackoverflow.com/questions/6999726/how-can-i-convert-a-datetime-object-to-milliseconds-since-epoch-unix-time-in-p

concrete.util.metadata.get_index_of_tool(lst_of_conc, tool)

Return the index of the object in the provided list whose tool name matches tool.

If tool is None, return the first valid index into lst_of_conc.

This returns -1 if:
  • lst_of_conc is None, or
  • lst_of_conc has no entries, or
  • no object in lst_of_conc matches tool.

Args:

  • lst_of_conc: A list of Concrete objects, each of which has a .metadata field.
  • tool: A tool name to match.
concrete.util.metadata.now_timestamp()

Return timestamp representing the current time.