EM27 Metadata Library
em27-metadata provides validated schemas and query interfaces for EM27/SUN measurement metadata. Its source now lives in the EM27 Retrieval Pipeline repository, while the library continues to be distributed under the em27_metadata package name. As of library version 1.11.0, the versioning of this library is in sync with the versioning of the EM27 Retrieval Pipeline.
The loader supports the current em27_metadata.toml schema and the former locations.json, sensors.json, campaigns.json, and events.json layout. See the metadata documentation for configuration details.
Library Usage
Install as a library:
pip install em27_metadata
# or
uv add em27_metadata
# or
pdm add em27_metadata
import datetime
import em27_metadata
em27_metadata_store = em27_metadata.load_from_github(
github_repository="org-name/repo-name",
access_token="your github access token",
)
# or load it from local files
em27_metadata_store = em27_metadata.load_from_local_files(
config_directory="directory that contains the em27_metadata.toml file",
)
metadata = location_data.get(
sensor_id="sid1",
from_datetime=datetime.datetime(
2020, 8, 26, 0, 0, 0, tzinfo=datetime.timezone.utc
),
to_datetime=datetime.datetime(
2020, 8, 26, 23, 59, 59, tzinfo=datetime.timezone.utc
),
)
print(metadata)
Prints out something like this:
[
{
"sensor_id": "sid1",
"serial_number": 50,
"from_datetime": "2020-08-26T00:00:00+0000",
"to_datetime": "2020-08-26T23:59:59+0000",
"location": {
"location_id": "lid1",
"details": "description of location 1",
"lon": 10.5,
"lat": 48.1,
"alt": 500.0
},
"utc_offset": 2.0,
"pressure_data_source": "LMU-MIM01-height-adjusted",
"atmospheric_profile_location": {
"location_id": "lid1",
"details": "description of location 1",
"lon": 10.5,
"lat": 48.1,
"alt": 500.0
}
}
]
The object returned by em27_metadata_store.get() is of type list[em27_metadata.types.SensorDataContext]. It is a Pydantic model (https://docs.pydantic.dev/) but can be converted to a dictionary using metadata.model_dump().
The list will contain one item per time period where the metadata properties are continuous (same setup). You can find dummy data in the data/ folder.
Metadata
Release files for em27_metadata 1.11.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| em27_metadata-1.11.1.tar.gz | 13.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| em27_metadata-1.11.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.4 kB
Release files / em27_metadata-1.11.1.tar.gz
| Download URL | em27_metadata-1.11.1.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd716a4941c8c479ee0dca5173d2d37baa4fdbdeb6270074c7862a794b444b9f
|
|
BLAKE2b-256 checksum How to use checksums |
943601969c64e23d0dffc1af6f74c98dd4fa2e35a488867ac36ac9370da74145
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / em27_metadata-1.11.1-py3-none-any.whl
| Download URL | em27_metadata-1.11.1-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef32d670ad6ef8f7a708204d81787374a7ca53dd38fc96583e6f02d4a59a92d9
|
|
BLAKE2b-256 checksum How to use checksums |
33256147d087a59f888e728b95071fa6c0e99255d8232ef311546cf816d28781
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|