DRB Extractor
Extractor
An extractor as its name suggests allowing to extract information/data from a node. An extractor is defined by a YAML content. Three extractor types exists currently:
Constant
This extractor nothing from the node but give always the same value.
constant: 42
Some string values are automatically converted to a specific Python type:
| Value | Python type |
|---|---|
| 2022-01-01 | datatime.date |
| 2022-01-01T00:00:00.000Z | datatime.datetime |
XQuery
This extractor allowing to extract data from the node via an XQuery script. See more details about XQuery.
xquery: |
data(./manifest.safe/XFDU/metadataSection/
metadataObject[@ID="generalProductInformation"]/metadataWrap/xmlData/
*[matches(name(),"standAloneProductInformation|generalProductInformation")]/
noiseCompressionType)
Python
The Python extractor allowing to extract data from a node via a Python script.
Where the node variable represents the current node.
python: |
return node['DATASTRIP'][0]['MTD_DS.xml']['Level-1C_DataStrip_ID']
['General_Info']['Datatake_Info'].get_attribute('datatakeIdentifier')
Script
The Script extractor allowing to extract data from a node via a Python method. A DrbNode given in argument of the extract method will be put in argument.
script: package.module:function1 # execute complex python script to generate the preview
example:
drbItemClass: aff2191f-5b06-4121-a9fa-f3d93f6c6331
variables:
- name: node_platform
xquery: |
./manifest.safe/XFDU/metadataSection/metadataObject[@ID="platform"]/
metadataWrap/xmlData/platform
metadata:
- name: 'platformName'
constant: 'Sentinel-1'
- name: 'SatelliteNumber'
xquery: |
declare variable $node_platform external;
data($node_platform/number)
- name: 'platformIdentifier'
python: |
return node_platform['nssdcIdentifier'].value
- name: 'resolutionDetail'
python: |
resolution = node.name[10:11]
if resolution == 'F':
return 'Full'
elif resolution == 'H':
return 'High'
elif resolution == 'M':
return 'Medium'
return None
- name: 'index_340_380'
script: package.module:function1
Metadata
Release files for drb-extractor 1.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| drb_extractor-1.3.3.tar.gz | 26.6 kB | Without provenance | Details for drb_extractor-1.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| drb_extractor-1.3.3-py3-none-any.whl | Python 3 | none | any | Details for drb_extractor-1.3.3-py3-none-any.whl |
Total release size: 34.7 kB
Release files / drb_extractor-1.3.3.tar.gz
| Download URL | drb_extractor-1.3.3.tar.gz |
|---|---|
| Size | 26.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fc7b81cc4f511f86e8ee5195459ecdce008691cd92a7341a6c9e5e7a1b166ac
|
|
BLAKE2b-256 checksum How to use checksums |
5bb2fbe2d178878c854f958075025365713ffe703b71ba6a41db4dd4980735ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.20
|
Release files / drb_extractor-1.3.3-py3-none-any.whl
| Download URL | drb_extractor-1.3.3-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d352ce1a47e63eb899899aee85b6cee387d7ae75ced9bcfc32642b86981eca61
|
|
BLAKE2b-256 checksum How to use checksums |
46eaceef1b45f462305c9e714a08be12f71e966b07fb4eb1d3143fd9a9ab938e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.20
|
Security for drb-extractor 1.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.