aim.digifeeds.item module

class aim.digifeeds.item.Item(data: dict)[source]

Bases: object

A Digifeeds Item

An item to be processed by the Digifeeds process.

data

The item

property barcode: str

The barcode of the Digifeeds item.

Returns:

The barcode.

Return type:

str

has_status(status: str) bool[source]

The status of this Digifeeds Item.

Parameters:

status (str) – A Digifeeds status.

Returns:

True if Digifeeds item has a status, Fales if Digifeeds item does not have a status.

Return type:

bool

property in_zephir_for_long_enough: bool

Returns whether or not the item has had metadata in zephir for more than 14 days. The production database saves timestamps in Eastern Time. K8s runs in UTC. Because this is checking days, this function doesn’t set the timezone because it’s not close enough to matter.

Returns:

whether or not the item’s metadata has been in zephir for more than 14 days.

Return type:

bool