Base Python Module¶
Pacifica Metadata ORM Base Class.
This class implements the basic functionality needed for all metadata objects in the metadata model for Pacifica.
PacificaModel.
Base class inherits from the PeeWee ORM Model class to create required fields by all objects and serialization methods for the base fields.
There are also CherryPy methods for creating, updating, getting and deleting these objects in from a web service layer.
-
class
pacifica.metadata.orm.base.
PacificaModel
(*args, **kwargs)[source]¶ Basic fields for an object within the model.
- Attributes:
Name Description created When was the object created updated When was the object last changed deleted When was the object deleted
-
DoesNotExist
¶ alias of
PacificaModelDoesNotExist
-
_meta
= <peewee.Metadata object>¶
-
_schema
= <peewee.SchemaManager object>¶
-
classmethod
_where_attr_clause
(where_clause, kwargs, keys)[source]¶ Grab keys and operators out of kwargs and return where clause.
-
classmethod
available_hash_list
()[source]¶ Generate a hashable structure of all keys and values of keys.
This structure allows for easy evaluation of updates or current vs old data for any object in the database.
-
classmethod
cls_foreignkey_rel_mods
()[source]¶ Return a collection of related models for a given foreignkey.
-
classmethod
cls_revforeignkeys
()[source]¶ Provide the rev foreign keys of the class as a list of attrs.
-
created
= <ExtendDateTimeField: PacificaModel.created>¶
-
deleted
= <ExtendDateTimeField: PacificaModel.deleted>¶
-
static
get_append_item
(obj_ref, fk_item_name, fk_obj_list)[source]¶ Generate the proper item to append to the newly built object.
-
classmethod
get_object_info
(where_clause=None)[source]¶ Get model and field information about the model class.
-
id
= <AutoField: PacificaModel.id>¶
-
updated
= <ExtendDateTimeField: PacificaModel.updated>¶