overture-sources 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ 3.11
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Overture Maps
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,47 @@
1
+ Metadata-Version: 2.4
2
+ Name: overture-sources
3
+ Version: 0.1.0
4
+ Summary: Deprecated, use overture-dataset-configs. Overture source registry JSON files.
5
+ Author: Overture Maps Foundation
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/OvertureMaps/overture-providers
8
+ Project-URL: Source, https://github.com/OvertureMaps/overture-providers/tree/main/packages/overture_sources
9
+ Project-URL: Issues, https://github.com/OvertureMaps/overture-providers/issues
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Requires-Python: >=3.11
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Provides-Extra: dev
16
+ Requires-Dist: pytest>=9.1.1; extra == "dev"
17
+ Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
18
+ Dynamic: license-file
19
+
20
+ # overture-sources
21
+
22
+ [![PyPI](https://img.shields.io/pypi/v/overture-sources?color=4051CC&labelColor=001A39)](https://pypi.org/project/overture-sources/)
23
+ [![Test Python](https://github.com/OvertureMaps/overture-providers/actions/workflows/test_python.yml/badge.svg?branch=main)](https://github.com/OvertureMaps/overture-providers/actions/workflows/test_python.yml)
24
+ [![Python 3.11+](https://img.shields.io/badge/Python-3.11%2B-4051CC?labelColor=001A39)](https://github.com/OvertureMaps/overture-providers/blob/main/packages/overture_sources/pyproject.toml)
25
+ [![License: MIT](https://img.shields.io/badge/license-MIT-05A5AF?labelColor=001A39)](https://github.com/OvertureMaps/overture-providers/blob/main/packages/overture_sources/LICENSE)
26
+
27
+ Overture source registry: the JSON files describing the datasets that feed each theme.
28
+
29
+ > [!WARNING]
30
+ > Deprecated in favor of [overture-dataset-configs](https://pypi.org/project/overture-dataset-configs/), which holds the same per-dataset license, attribution and coverage details. This package is kept for existing consumers of the per-theme files; new code should use the dataset configs.
31
+
32
+ ```python
33
+ from overture_sources import load_sources, theme_names
34
+
35
+ theme_names() # ["addresses", "base", ...]
36
+ load_sources("places") # parsed overture_sources/places.json
37
+ ```
38
+
39
+ ## Concepts
40
+
41
+ - **Theme**: a top-level Overture data category, such as places or buildings. There is one file per theme, plus `property_descriptions`. See the [Overture schema documentation](https://docs.overturemaps.org/schema/) for what each theme contains.
42
+ - **Source**: an organization whose data contributes to a theme.
43
+ - **Dataset**: one specific collection of data from a source. Its `dataset_name` is the value that appears as `dataset` in a feature's `sources` property in Overture data.
44
+
45
+ Each theme file has a `datasets` list, with one entry per source and dataset pair, plus a `license_priority` mapping of license identifiers to a priority rank. An entry records the dataset's license, attribution, coverage, refresh cadence and the date it was first used in the theme. `property_descriptions.json` documents every field.
46
+
47
+ For the attribution and license terms as published with each release, see the [Overture attribution page](https://docs.overturemaps.org/attribution/).
@@ -0,0 +1,28 @@
1
+ # overture-sources
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/overture-sources?color=4051CC&labelColor=001A39)](https://pypi.org/project/overture-sources/)
4
+ [![Test Python](https://github.com/OvertureMaps/overture-providers/actions/workflows/test_python.yml/badge.svg?branch=main)](https://github.com/OvertureMaps/overture-providers/actions/workflows/test_python.yml)
5
+ [![Python 3.11+](https://img.shields.io/badge/Python-3.11%2B-4051CC?labelColor=001A39)](https://github.com/OvertureMaps/overture-providers/blob/main/packages/overture_sources/pyproject.toml)
6
+ [![License: MIT](https://img.shields.io/badge/license-MIT-05A5AF?labelColor=001A39)](https://github.com/OvertureMaps/overture-providers/blob/main/packages/overture_sources/LICENSE)
7
+
8
+ Overture source registry: the JSON files describing the datasets that feed each theme.
9
+
10
+ > [!WARNING]
11
+ > Deprecated in favor of [overture-dataset-configs](https://pypi.org/project/overture-dataset-configs/), which holds the same per-dataset license, attribution and coverage details. This package is kept for existing consumers of the per-theme files; new code should use the dataset configs.
12
+
13
+ ```python
14
+ from overture_sources import load_sources, theme_names
15
+
16
+ theme_names() # ["addresses", "base", ...]
17
+ load_sources("places") # parsed overture_sources/places.json
18
+ ```
19
+
20
+ ## Concepts
21
+
22
+ - **Theme**: a top-level Overture data category, such as places or buildings. There is one file per theme, plus `property_descriptions`. See the [Overture schema documentation](https://docs.overturemaps.org/schema/) for what each theme contains.
23
+ - **Source**: an organization whose data contributes to a theme.
24
+ - **Dataset**: one specific collection of data from a source. Its `dataset_name` is the value that appears as `dataset` in a feature's `sources` property in Overture data.
25
+
26
+ Each theme file has a `datasets` list, with one entry per source and dataset pair, plus a `license_priority` mapping of license identifiers to a priority rank. An entry records the dataset's license, attribution, coverage, refresh cadence and the date it was first used in the theme. `property_descriptions.json` documents every field.
27
+
28
+ For the attribution and license terms as published with each release, see the [Overture attribution page](https://docs.overturemaps.org/attribution/).
@@ -0,0 +1,27 @@
1
+ """Overture source registry JSON files, one per theme."""
2
+
3
+ import json
4
+ from importlib.resources import files
5
+ from typing import Any
6
+
7
+ _PACKAGE = files(__package__)
8
+
9
+
10
+ def theme_names() -> list[str]:
11
+ """Return the sorted theme names that have a packaged sources file."""
12
+ return sorted(
13
+ p.name.removesuffix(".json")
14
+ for p in _PACKAGE.iterdir()
15
+ if p.name.endswith(".json")
16
+ )
17
+
18
+
19
+ def load_sources(theme: str) -> dict[str, Any]:
20
+ """Return the parsed sources file for ``theme`` (the JSON file stem).
21
+
22
+ Raises ``KeyError`` if no file exists for that theme.
23
+ """
24
+ path = _PACKAGE / f"{theme}.json"
25
+ if "/" in theme or "\\" in theme or not path.is_file():
26
+ raise KeyError(f"unknown theme: {theme!r}")
27
+ return json.loads(path.read_text(encoding="utf-8"))