Metadata-Version: 2.5
Name: taco-eo
Version: 0.8.0
Summary: Read and write TACO datasets in Python.
Project-URL: Homepage, https://asterisk.coop/taco
Project-URL: Specification, https://asterisk.coop/taco/spec
Project-URL: Repository, https://github.com/asterisk-labs/taco
Project-URL: Issues, https://github.com/asterisk-labs/taco/issues
Author-email: Cesar Aybar <cesar@asterisk.coop>
License-Expression: MIT
License-File: LICENSE
Keywords: cloud-optimized,cozip,earth-observation,geospatial,machine-learning,parquet,taco
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: cffi>=1.17
Requires-Dist: cozip>=2026.9.4
Requires-Dist: duckdb>=1.5.5
Requires-Dist: numpy>=1.24
Requires-Dist: pyarrow>=14
Requires-Dist: pydantic>=2.8
Requires-Dist: pyproj>=3.6
Requires-Dist: shapely>=2
Requires-Dist: tqdm>=4.66
Provides-Extra: antimeridian
Requires-Dist: antimeridian>=0.4; extra == 'antimeridian'
Requires-Dist: pyproj>=3.6; extra == 'antimeridian'
Requires-Dist: shapely>=2; extra == 'antimeridian'
Provides-Extra: dev
Requires-Dist: mypy>=1.8; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Provides-Extra: geoenrich
Requires-Dist: earthengine-api>=1; extra == 'geoenrich'
Provides-Extra: rumi
Requires-Dist: rumi-eo[write]>=0.19; extra == 'rumi'
Provides-Extra: test
Requires-Dist: pytest-cov>=5; extra == 'test'
Requires-Dist: pytest>=8; extra == 'test'
Provides-Extra: test-eo
Requires-Dist: antimeridian>=0.4; extra == 'test-eo'
Requires-Dist: rumi-eo[write]>=0.19; extra == 'test-eo'
Description-Content-Type: text/markdown

# taco

Read and write TACO datasets in Python.

```bash
pip install taco-eo
python examples/minimal.py
```

Published wheels include the native TACO reader. Building from the source
distribution requires a C++23 compiler, CMake, Ninja, pkg-config, libcurl
7.83 or newer, and OpenSSL 3 or newer.

```python
import taco

samples = taco.read("dataset.zip")
parts = taco.read(["part-0.zip", "part-1.zip"])

dataset = taco.open_dataset("dataset.zip")
targets = dataset.read(files="target.tif")
train = dataset.sql("SELECT * FROM data WHERE \"ml:split\" = 'train'")
```

Versioned dataset roots select their declared default release without listing
remote storage. Use a release URL to open an immutable version directly.

```python
dataset = taco.open_dataset("https://data.source.coop/major-tom/core-dem/")
print(dataset.version)
print(dataset.versions)

previous = taco.open_dataset("https://data.source.coop/major-tom/core-dem/1.0.0/")
```

`export()` writes a smaller dataset with the same contract. `samples` is a
PyArrow-compatible table, normally selected from the `data` SQL relation.
Keyword arguments replace fields of the collection, such
as `id` or `description`; the rest is inherited. For a remote source, metadata
is cached and only the payload files belonging to the selected samples are
downloaded. Pass `overwrite=True` to replace an existing TACO output.

```python
source = "https://data.source.coop/major-tom/core-dem/"
dataset = taco.open_dataset(source)
rows = dataset.sql("SELECT * FROM data ORDER BY sample_id LIMIT 10")
taco.export(
    source,
    "core-dem-sample.zip",
    samples=rows,
    id="core-dem-sample",
    description="Ten samples from Core-DEM",
)
```

Remote reads and exports show download progress in interactive terminals.
Writers show their build progress when opened with `progress=True`.

## Examples

Every example is self-contained, uses synthetic data, and writes its output in
the current directory.

Spatial and temporal metadata use separate profiles: `Spatial` for regular
spatial grids, `ISpatial` for irregular footprints, and `Temporal` for time
alone. `STAC` combines regular spatial + temporal metadata; `ISTAC` combines
irregular spatial + temporal metadata.

| Example | What it demonstrates |
| --- | --- |
| [`minimal.py`](examples/minimal.py) | Smallest possible single-file dataset |
| [`numpy_minimal.py`](examples/numpy_minimal.py) | NumPy image and mask assets with a train/test split |
| [`change_detection.py`](examples/change_detection.py) | Metadata on `before/` and `after/` folders |
| [`sequence.py`](examples/sequence.py) | Variable-length asset sequences |
| [`time_series.py`](examples/time_series.py) | Per-observation time and cloud metadata |
| [`geospatial.py`](examples/geospatial.py) | Compact STAC metadata and derived MajorTOM cells |
| [`stac_segmentation.py`](examples/stac_segmentation.py) | STAC extensions for regular raster chips, labels, bands, and scaling |
| [`oceantaco_istac.py`](examples/oceantaco_istac.py) | OceanTACO-inspired ISTAC metadata for irregular SWOT swaths and Argo collocations |
| [`partitioned.py`](examples/partitioned.py) | ZIP partitions and their TACOCAT catalog |
