caoscrawler.identifiable module

class caoscrawler.identifiable.Identifiable(record_id: int | None = None, path: str | None = None, record_type: str | None = None, name: str | None = None, properties: dict | None = None, backrefs: list[int | str] | None = None)

Bases: object

The fingerprint of a Record in CaosDB.

This class contains the information that is used by the CaosDB Crawler to identify Records. On one hand, this can be the ID or a Record or the path of a File. On the other hand, in order to check whether a Record exits in the CaosDB Server, a query can be created using the information contained in the Identifiable.

Parameters:
  • record_type (str, this RecordType has to be a parent of the identified object) –

  • name (str, the name of the identified object) –

  • properties (dict, keys are names of Properties; values are Property values) – Note, that lists are not checked for equality but are interpreted as multiple conditions for a single Property.

  • path (str, In case of files: The path where the file is stored.) –

  • backrefs (list, TODO future) –

get_representation() str