Skip to main content

Authoritative tooling for creating OGC API - EDR Part 3 Service Profiles

Project description

OGC API - EDR Part 3 Service Profile Generator

Authoritative tooling for creating OGC API - Environmental Data Retrieval (EDR) Part 3 Service Profiles, built on Pydantic.

Overview

Profile structure is defined as Pydantic models (src/models.py). Instantiating a ServiceProfile validates the entire profile — enums enforce normative OGC values, cross-model validators catch referential errors — before any files are written.

Repository Structure

├── src/
│   ├── models.py     # Authoritative Pydantic schema (ServiceProfile, Collection, Requirement, etc.)
│   ├── generate.py   # Serialization: validated model → OpenAPI, AsyncAPI, AsciiDoc
│   └── cli.py        # CLI entry point
├── examples/
│   └── water_gauge.yaml  # Example profile config
└── requirements.txt

Installation

pip install -r requirements.txt

Usage

Define your profile in YAML or JSON, then generate:

python src/cli.py --config examples/water_gauge.yaml --output ./my_profile

Output

my_profile/
├── openapi.yaml
├── asyncapi.yaml                        # if pubsub is configured
├── profile_config.json                  # round-trip model export
├── requirements/
│   ├── requirements_class_core.adoc
│   └── core/REQ_<id>.adoc
└── abstract_tests/
    ├── ATS_class_core.adoc
    └── core/ATS_<id>.adoc

Profile Config Schema

Key fields in your YAML/JSON config:

Field Type Description
name string Lowercase identifier, e.g. water_gauge
title string Human-readable profile title
collections list One or more EDR collections
collections[].query_types enum[] items, position, area, radius, cube, trajectory, corridor, locations, instances
collections[].output_formats enum[] GeoJSON, CoverageJSON, CSV, NetCDF, GRIB, Zarr
requirements list Normative requirements
abstract_tests list Conformance tests (each must reference a valid requirement id)
pubsub object Optional OGC API - EDR Part 2 PubSub config (AMQP/MQTT/Kafka)

See examples/water_gauge.yaml for a complete example.

Programmatic Use

from src.models import ServiceProfile
from src.generate import generate
from pathlib import Path

profile = ServiceProfile.model_validate_json(open("my_profile.json").read())
generate(profile, Path("./output"))

Standards

  • OGC API - EDR Part 1: Core
  • OGC API - EDR Part 2: PubSub
  • OGC API - EDR Part 3: Service Profiles (draft)
  • OpenAPI 3.0 / AsyncAPI 3.0
  • Metanorma/AsciiDoc documentation format

License

Apache License 2.0 — See LICENSE for details.

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ogc_edr_profile-1.0.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ogc_edr_profile-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file ogc_edr_profile-1.0.0.tar.gz.

File metadata

  • Download URL: ogc_edr_profile-1.0.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for ogc_edr_profile-1.0.0.tar.gz
Algorithm Hash digest
SHA256 17fe829bd12e174c9b621e30acad93533834a4125a99a36002cd64a252f31d75
MD5 842d1cca2a671646efba75fd299a1adb
BLAKE2b-256 044e2db20cdbec18a7fb012c6e99ed00ba4bf5542848c4cea083a3e83b2d82d2

See more details on using hashes here.

File details

Details for the file ogc_edr_profile-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ogc_edr_profile-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 812da726ef2beaf397f95bacb7d88df77284d6f15f5056e2bf30a20ae805e673
MD5 03a53f525fa0631602cc5fcf0971469e
BLAKE2b-256 b7d93c3528acd02e7a700ce7e533d487d57856b376d54e05957e2bad3cb50fd5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page