Mongo meta
Classes¶
MongoDidMeta ¶
MongoDidMeta(
host=None,
port=None,
db=None,
collection=None,
user=None,
password=None,
)
Functions¶
get_metadata ¶
get_metadata(scope, name, *, session=None)
Get data identifier metadata.
| PARAMETER | DESCRIPTION |
|---|---|
scope
|
The scope name
|
name
|
The data identifier name
|
session
|
The database session in use
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
|
The metadata for the DID |
set_metadata ¶
set_metadata(
scope,
name,
key,
value,
recursive=False,
*,
session=None
)
Set single metadata key.
| PARAMETER | DESCRIPTION |
|---|---|
scope
|
the scope of DID
|
name
|
the name of the DID
|
key
|
the key to be added
|
value
|
the value of the key to be added
|
recursive
|
recurse into DIDs (not supported)
DEFAULT:
|
session
|
The database session in use
TYPE:
|
set_metadata_bulk ¶
set_metadata_bulk(
scope, name, metadata, recursive=False, *, session=None
)
Bulk set metadata keys.
| PARAMETER | DESCRIPTION |
|---|---|
scope
|
the scope of DID
|
name
|
the name of the DID
|
metadata
|
dictionary of metadata keypairs to be added
|
recursive
|
recurse into DIDs (not supported)
DEFAULT:
|
session
|
The database session in use
TYPE:
|
delete_metadata ¶
delete_metadata(scope, name, key, *, session=None)
Delete a key from metadata.
| PARAMETER | DESCRIPTION |
|---|---|
scope
|
the scope of DID
|
name
|
the name of the DID
|
key
|
the key to be deleted
|