Skip to main content

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.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for em27_metadata 1.11.3
File Size Uploaded Provenance Actions
em27_metadata-1.11.3.tar.gz 13.5 kB Without provenance Details for em27_metadata-1.11.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for em27_metadata 1.11.3
File Interpreter ABI Platform Actions
em27_metadata-1.11.3-py3-none-any.whl Python 3 none any Details for em27_metadata-1.11.3-py3-none-any.whl

Total release size: 31.4 kB

Release files / em27_metadata-1.11.3.tar.gz

Download URL em27_metadata-1.11.3.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a75b29acd499e83f13fb5352648517d50bcac84cbb36db60316b49acd6478379
BLAKE2b-256 checksum
How to use checksums
ecee6542004e47335d31ce6020b900c1376fe26e1cc248717e9399698e09dbb9
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.3-py3-none-any.whl

Download URL em27_metadata-1.11.3-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ca9a6fabdd31859c2ca6a8663b3b9a95fafc68377822aa3d9da9f0ff0914d37
BLAKE2b-256 checksum
How to use checksums
7aa155effad5e655c916d68b558a7c2d314bad3384ef85e4e1f0dee29b821bab
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}

Security for em27_metadata 1.11.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page