DRB Metadata Extractor
Project description
DRB Metadata Extractor
It's an applicative part using DRB allowing to extract metadata from data according its topic.
Metadata
How to extract metadata ?
from drb.metadata import MetadataAddon
import drb.topics.resolver as resolver
if __name__ == '__main__':
topic, node = resolver.resolve('<my_resource_url>')
# topic keyword argument is not mandatory
metadata = MetadataAddon().apply(node, topic=topic)
for md_name, md in metadata.items():
print(md_name, ' -- ', md.extract())
How to define metadata ?
Metadata are defined in a cortex.yaml file following the template:
drbItemClass: <topic_uuid> # target topic
variables: # variable list
- name: <var_name> # variable name
<extractor>: <extractor_content> # an extractor
metadata: # metadata list
- name: my_metadata # metadata name
<extractor>: <extractor_content> # an extractor
- metadata are applied to their target topic and its derivatives
- inherited metadata is override if it's redefined in a derivative topic
- variables are not transitive between a topic and its derivatives
Packaging
The package python containing metadata of a DRB topic must have the following instruction:
- a
drb.metadataentry point whose its value is the targeted Python package containing thecortex.yamlfile
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
drb_metadata-1.4.1.tar.gz
(26.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file drb_metadata-1.4.1.tar.gz.
File metadata
- Download URL: drb_metadata-1.4.1.tar.gz
- Upload date:
- Size: 26.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59dfd8a50dfc2602d15cd79a324388c4bb62069ca4ec203b5388668320a12b3f
|
|
| MD5 |
42db779802c472e59d661fe4f467e9b3
|
|
| BLAKE2b-256 |
f61fff6bfc3f7b8200c7b3152e53e79474f5981399303ac33b5e2c1ec10b0a50
|
File details
Details for the file drb_metadata-1.4.1-py3-none-any.whl.
File metadata
- Download URL: drb_metadata-1.4.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6f9ed944194592a1f233ea935c7daad6b72d7f9e9f9022f14875aeedb3cb56d
|
|
| MD5 |
10188f5055bc12f484194efd6ad438f7
|
|
| BLAKE2b-256 |
95d40fa7dae2363889b6296b7acf2cc428dc656ff2d18a28e5c5bb5971d8f5b4
|