angelos.portfolio.collection¶
-
exception
angelos.portfolio.collection.FrozenPortfolioError¶ Bases:
RuntimeWarningComplaining on frozen portfolio when it must be mutable.
-
class
angelos.portfolio.collection.Operations¶ Bases:
objectOperations carried out on a portfolio, policies applied.
-
validate(*args, **kwargs)¶ Wrapping the callable.
- Parameters
self (class) – Method owner
*args – Any arguments
**kwargs – Any keyword arguments
- Returns
The result from the callable
-
-
class
angelos.portfolio.collection.Portfolio(docs: Set[angelos.document.document.Document], frozen: bool = True)¶ Bases:
collections.abc.CollectionCollection of public documents belonging and related to an entity.
-
documents() → Set[angelos.document.document.Document]¶ Portfolio original documents.
-
property
entity¶ Entity that owns the portfolio.
-
filter(docs: Set[angelos.document.document.Document]) → Set[angelos.document.document.Document]¶ Filter out the current portfolio documents against given set.
-
freeze()¶ Freeze the portfolio so it can’t be tampered with
-
get_doc(types) → angelos.document.document.Document¶ Get first document from set of document class.
-
get_id(doc_id: uuid.UUID) → angelos.document.document.Document¶ Get document based on id.
-
get_issuer(docs: Set[angelos.document.document.Document], issuer: uuid.UUID) → Set[angelos.document.document.Document]¶ Get set of documents based on issuer.
-
get_not_expired(docs: Set[angelos.document.document.Document]) → Set[angelos.document.document.Document]¶ Get set of documents based on expiry date.
-
get_owner(docs: Set[angelos.document.document.Document], owner: uuid.UUID) → Set[angelos.document.document.Document]¶ Get set of documents based on owner.
-
get_subset(types: Union[angelos.document.model.DocumentMeta, Tuple[angelos.document.model.DocumentMeta, …]]) → Set[angelos.document.document.Document]¶ Get a subset of classes based on document class.
-
get_type(docs: set, doc_cls: Union[angelos.document.model.DocumentMeta, Tuple[angelos.document.model.DocumentMeta, …]]) → Set[angelos.document.document.Document]¶ Get set of documents filtered by class.
-
is_frozen() → bool¶ True if portfolio is frozen, else false.
-
issuer() → Set[angelos.document.document.Document]¶ Statements issued by entity.
-
property
keys¶ Public keys.
-
property
network¶ Network for the entity.
-
owner() → Set[angelos.document.document.Document]¶ Statements owned by entity.
-
property
profile¶ Profile for the entity.
-
property
revoked¶ Revokes of statements.
-
property
revoked_issuer¶ Revokes of statements issued by entity.
-
property
revoked_owner¶ Revokes of statements owned by entity.
-
property
statements¶ Statements.
-
property
trusted¶ Trust statements.
-
property
trusted_issuer¶ Trust statements issued by entity.
-
property
trusted_owner¶ Trust statements owned by entity.
-
property
verified¶ Verification statements.
-
property
verified_issuer¶ Verification statements issued by entity.
-
property
verified_owner¶ Verification statements owned by entity.
-
-
class
angelos.portfolio.collection.PrivatePortfolio(docs: Set[angelos.document.document.Document], frozen: bool = True)¶ Bases:
angelos.portfolio.collection.PortfolioPrivate documents of an entity.
-
property
domain¶ Domain for the entity.
-
property
nodes¶ Nodes of the current domain.
-
property
privkeys¶ Private keys of entity.
-
to_portfolio() → angelos.portfolio.collection.Portfolio¶ Create portfolio filtering private portfolio specific documents.
-
property
-
exception
angelos.portfolio.collection.WrongPortfolioIdentity¶ Bases:
RuntimeWarningComplaining of wrong portfolio identity assigned.