yawning_titan.db.doc_metadata#
Classes
A base class for managing access to the |
|
A secure class to hold metadata related to a document in a Yawning-Titan TinyDB file. |
|
A schema-like class that defines the document metadata fields. |
- class yawning_titan.db.doc_metadata.DocMetaDataObject[source]#
A base class for managing access to the
doc_metadataattribute.- property doc_metadata#
The configs document metadata.
- class yawning_titan.db.doc_metadata.DocMetadata(uuid=None, name=None, description=None, author=None, locked=False, created_at=None, updated_at=None)[source]#
A secure class to hold metadata related to a document in a Yawning-Titan TinyDB file.
The
uuidandcreated_atattributes are set upon instantiation if they are not passed as params. Once set, they cannot be changed.The
DocMetadataconstructor.- Parameters:
uuid – The documents globally unique identifier.
name – The name given to the document by the author.
description – The description given to the document by the author.
author – The original author of the document.
locked – Whether the doc is locked for editing or not.
created_at – The datetime the document was created at as an ISO 8601 str.
updated_at – The datetime the document was last updated at as an ISO 8601 str.
- __init__(uuid=None, name=None, description=None, author=None, locked=False, created_at=None, updated_at=None)[source]#
The
DocMetadataconstructor.- Parameters:
uuid – The documents globally unique identifier.
name – The name given to the document by the author.
description – The description given to the document by the author.
author – The original author of the document.
locked – Whether the doc is locked for editing or not.
created_at – The datetime the document was created at as an ISO 8601 str.
updated_at – The datetime the document was last updated at as an ISO 8601 str.
- property uuid#
The documents globally unique identifier.
- property created_at#
The datetime the document was created at as an ISO 8601 str.
- property locked#
Whether the doc is locked for editing or not.
- property updated_at#
The datetime the document was last updated at as an ISO 8601 str.
- property name#
The name given to the document by the author.
- property description#
The description given to the document by the author.
- property author#
The original author of the document.
- update(name=None, description=None, author=None)[source]#
Updated the name, description, and author.
- Parameters:
name – The name given to the document by the author.
description – The description given to the document by the author.
author – The original author of the document.
- class yawning_titan.db.doc_metadata.DocMetadataSchema[source]#
A schema-like class that defines the document metadata fields.
Fields are defined using the
YawningTitanQueryclass so that schema paths can be used directly withintinydb.table.Table.search()function calls. All fields are mapped to a property in theDocMetadataclass.