Package p6 :: Package metadata :: Module persistance
[show private | hide private]
[frames | no frames]

Module p6.metadata.persistance

Basic metadata persistance functionality.

XXX Note this implementation does not support storing metadata values which may apply to multiple objects or interfaces with multiple implementors.
Function Summary
  get(group, key)
Load a metadata value from persistant storage.
callable item_id(item)
Returns a callable which can be used to get the identifier for a class; if the item has a getIdentifier method, we use that.
  store(group, key, value)
Stores a metadata value to persistant storage.

Variable Summary
str PERST_FILE = 'p6.settings'

Function Details

get(group, key)

Load a metadata value from persistant storage.
Parameters:
group - The metadata group ID this field belongs to.
key - The metadata field ID to be loaded.
           (type=String)
Raises:
KeyError - If the group-key combination is not found in storage.

item_id(item)

Returns a callable which can be used to get the identifier for a class; if the item has a getIdentifier method, we use that.
Returns:
callable

store(group, key, value)

Stores a metadata value to persistant storage.
Parameters:
group - The metadata group ID this field belongs to.
           (type=String)
key - The metadata field ID to be stored.
           (type=String)
value - The value to store.

Variable Details

PERST_FILE

Type:
str
Value:
'p6.settings'                                                          

Generated by Epydoc 2.1 on Fri Jun 24 12:01:20 2005 http://epydoc.sf.net