Utils Python Module

Utilities for common metadata tools.

class pacifica.metadata.orm.utils.ExtendDateField(formats=None, *args, **kwargs)

Appends to the DateField to add isoformatted date.

isoformat()

Return the isoformat date field.

class pacifica.metadata.orm.utils.ExtendDateTimeField(formats=None, *args, **kwargs)

Appends to the DateTimeField to add isoformat from datetime object.

isoformat()

Return the isoformat datetime field.

pacifica.metadata.orm.utils.date_converts(date_obj)

Standardize on converting to date objects.

pacifica.metadata.orm.utils.datetime_converts(time_obj)

Standardize on converting to datetime objects.

pacifica.metadata.orm.utils.datetime_now_nomicrosecond()

Return now with no microseconds.

pacifica.metadata.orm.utils.index_hash(*args)

Generate a hash for all the arguments passed.

This is used to combine multiple unique IDs into a single string.