ivcap_client.aspect
Module Contents
Classes
This class represents a aspect record |
|
Helper class that provides a standard way to create an ABC using |
Functions
|
Add an 'aspect' to an 'entity'. The 'schema' of the aspect, if not defined |
- class ivcap_client.aspect.Aspect(ivcap: ivcap_client.ivcap.IVCAP, **kwargs)[source]
This class represents a aspect record stored at a particular IVCAP deployment
- property urn: str
- property aspect: dict
- property content: dict
- id: str
- entity: str
- schema: str
- content_type: Optional[str]
- valid_from: Optional[datetime.datetime]
- valid_to: Optional[datetime.datetime]
- asserter: Optional[ivcap_client.ivcap.URN]
- retracter: Optional[ivcap_client.ivcap.URN]
- classmethod _from_list_item(item: ivcap_client.models.aspect_list_item_rt.AspectListItemRT, ivcap: ivcap_client.ivcap.IVCAP)[source]
- class ivcap_client.aspect.AspectIter(ivcap: ivcap_client.ivcap.IVCAP, **kwargs)[source]
Bases:
ivcap_client.utils.BaseIter
[Aspect
,ivcap_client.models.aspect_list_item_rt.AspectListItemRT
]Helper class that provides a standard way to create an ABC using inheritance.
- ivcap_client.aspect._add_update_aspect(ivcap: ivcap_client.ivcap.IVCAP, is_update: bool, entity: str, aspect: Dict[str, any], *, schema: Optional[str] = None, policy: Optional[ivcap_client.ivcap.URN] = None) Aspect [source]
Add an ‘aspect’ to an ‘entity’. The ‘schema’ of the aspect, if not defined is expected to found in the ‘aspect’ under the ‘$schema’ key.
- Parameters:
entity (str) – URN of the entity to attach the aspect to
aspect (dict) – The aspect to be attached
schema (Optional[str], optional) – Schema of the aspect. Defaults to ‘aspect[“$schema”]’.
policy – Optional[URN]: Set specific policy controlling access (’urn:ivcap:policy:…’).
- Returns:
The created aspect record
- Return type:
aspect