clams.appmetadata package
Module contents
- class clams.appmetadata.AppMetadata(*, name: str, description: str, app_version: str = None, mmif_version: str = None, analyzer_version: str = None, app_license: str, analyzer_license: str = None, identifier: AnyHttpUrl, url: AnyHttpUrl, input: List[Input | List[Input]] = [], output: List[Output] = [], parameters: List[RuntimeParameter] = [], dependencies: List[str] = None, more: Dict[str, str] = None)[source]
Defines a data model that describes a CLAMS app.
Can be initialized by simply passing all required key-value pairs.
If you have a pre-generated metadata as an external file, you can read in the file as a
dict
and use it as keyword arguments for initialization. But be careful with keys of which values are automatically generated by the SDK.Please refer to <CLAMS App Metadata> for the metadata specification.
- add_input(at_type: str | TypesBase, required: bool = True, **properties)[source]
Helper method to add an element to the
input
list.- Parameters:
at_type –
@type
of the input objectrequired – whether this type is mandatory or optional
properties – additional property specifications
- add_more(key: str, value: str)[source]
Helper method to add a k-v pair to the
more
map. :param key: key of an additional metadata :param value: value of the additional metadata