guillotina.content

class guillotina.content.Resource(id=None)

Base resource object class

acl

Access control list stores security information on the object

Return type:dict
add_behavior(iface)

We need to apply the marker interface.

value: Interface to add

Return type:None
remove_behavior(iface)

We need to apply the marker interface.

value: Interface to add

Return type:None
uuid

The unique id of the content object

class guillotina.content.Item(id=None)

Basic item content type. Inherits from Resource

class guillotina.content.Folder(id=None)

Basic folder content type. Inherits from Resource but provides interface to work with contained objects asynchronously.

async_contains(key)

Asynchronously check if key exists inside this folder

Parameters:key (str) – key of child object to check
Return type:bool
async_del(key)

Asynchronously delete object in the folder

Parameters:key (str) – key of child objec to delete
Return type:None
async_get(key, default=None, suppress_events=False)

Asynchronously get an object inside this folder

Parameters:key (str) – key of child object to get
Return type:Resource
async_items(suppress_events=False)

Asynchronously iterate through contents of folder

Return type:Asynciterator[Tuple[str, Resource]]
async_keys()

Asynchronously get the sub object keys in this folder

Return type:List[str]
async_len()

Asynchronously calculate the len of the folder

Return type:int
async_multi_get(keys, default=None, suppress_events=False)

Asynchronously get an multiple objects inside this folder

Parameters:keys (List[str]) – keys of child objects to get
Return type:Asynciterator[Tuple[Resource]]
async_set(key, value)

Asynchronously set an object in this folder

Parameters:
  • key (str) – key of child object to set
  • value (Resource) – object to set as child
Return type:

None

class guillotina.content.Container(id=None)
guillotina.content.create_content_in_container(parent, type_, id_, request=None, check_security=True, **kw)

Utility to create a content.

This method is the one to use to create content. id_ can be None

Parameters:
  • parent (Folder) – where to create content inside of
  • type – content type to create
  • id – id to give content in parent object
  • request (Optional[<InterfaceClass guillotina.interfaces.IRequest>]) – <optional>
  • check_security – be able to disable security checks
Return type:

Resource

guillotina.content.get_all_possible_schemas_for_type(type_name)
Return type:List[<InterfaceClass zope.interface.Interface>]
guillotina.content.iter_schemata(obj)
Return type:Iterator[<InterfaceClass zope.interface.Interface>]