Orm Python Module

Core interface for each ORM object to interface with CherryPy.

class pacifica.metadata.rest.orm.CherryPyAPI(*args, **kwargs)[source]

Core CherryPy interface for all orm objects.

DELETE(**kwargs)

Wrapper to connect and close connection to database.

DoesNotExist

alias of CherryPyAPIDoesNotExist

GET(**kwargs)

Wrapper to connect and close connection to database.

POST(**kwargs)

Wrapper to connect and close connection to database.

PUT(**kwargs)

Wrapper to connect and close connection to database.

static _CherryPyAPI__fix_dates(orig_obj, db_obj)

Fix the dates for insert.

_delete(**kwargs)[source]

Internal delete object method.

_force_delete(**kwargs)[source]

Force delete entries in the database.

_insert(objs)[source]

Insert object from json into the system.

classmethod _insert_many_format(obj_hashes)[source]
_meta = <peewee.Metadata object>
static _primary_keys_as_dict(obj)[source]

Turn the primary keys for self into get parameters for web access.

_schema = <peewee.SchemaManager object>
_select(**kwargs)[source]

Internal select method.

static _send_orm_event(obj_cls, objs, method)[source]
_set_or_create(objs)[source]

Set or create the object if it doesn’t already exist.

static _set_recursion_depth(flags, kwargs)[source]
static _set_recursion_limit(flags, kwargs)[source]
_update(update_hash, **kwargs)[source]

Internal update method for an object.

classmethod check_for_key_existence(object_list)[source]

Check for already loaded keys to prevent collisions.

created = <ExtendDateTimeField: CherryPyAPI.created>
deleted = <ExtendDateTimeField: CherryPyAPI.deleted>
es_recursive_flags = {'recursion_depth': 1, 'recursion_exclude': [], 'recursion_limit': 1000}
exposed = True
id = <AutoField: CherryPyAPI.id>
updated = <ExtendDateTimeField: CherryPyAPI.updated>
pacifica.metadata.rest.orm._encode(value)[source]
pacifica.metadata.rest.orm.json_handler(*args, **kwargs)[source]

JSON handler to encode the data value.