atlas-python 0.9.0__tar.gz → 0.9.1__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.
Files changed (80) hide show
  1. {atlas_python-0.9.0 → atlas_python-0.9.1}/Cargo.lock +2 -2
  2. {atlas_python-0.9.0 → atlas_python-0.9.1}/Cargo.toml +2 -2
  3. {atlas_python-0.9.0 → atlas_python-0.9.1}/LICENSE +1 -1
  4. atlas_python-0.9.1/PKG-INFO +269 -0
  5. {atlas_python-0.9.0 → atlas_python-0.9.1}/README.md +6 -0
  6. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/Cargo.toml +1 -1
  7. atlas_python-0.9.1/atlas-python/LICENSE +201 -0
  8. atlas_python-0.9.1/atlas-python/README.md +236 -0
  9. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/benchmarks.md +2 -2
  10. atlas_python-0.9.1/atlas-python/docs/examples.md +36 -0
  11. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/guides/cloud-storage.md +1 -1
  12. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/guides/codecs-and-meta.md +2 -2
  13. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/guides/shared-arrays.md +1 -1
  14. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/guides/stats.md +1 -1
  15. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/mkdocs.yml +1 -1
  16. {atlas_python-0.9.0 → atlas_python-0.9.1}/pyproject.toml +18 -1
  17. atlas_python-0.9.0/PKG-INFO +0 -17
  18. atlas_python-0.9.0/atlas-python/README.md +0 -275
  19. atlas_python-0.9.0/atlas-python/docs/examples.md +0 -36
  20. {atlas_python-0.9.0 → atlas_python-0.9.1}/.github/workflows/atlas-python-release.yaml +0 -0
  21. {atlas_python-0.9.0 → atlas_python-0.9.1}/.github/workflows/atlas-rust-release.yaml +0 -0
  22. {atlas_python-0.9.0 → atlas_python-0.9.1}/.github/workflows/ci.yaml +0 -0
  23. {atlas_python-0.9.0 → atlas_python-0.9.1}/.gitignore +0 -0
  24. {atlas_python-0.9.0 → atlas_python-0.9.1}/CONTRIBUTING.md +0 -0
  25. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/.python-version +0 -0
  26. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/benchmarks/README.md +0 -0
  27. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/benchmarks/_common.py +0 -0
  28. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/benchmarks/bench_collection.py +0 -0
  29. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/benchmarks/generate_bench_charts.py +0 -0
  30. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/assets/bench_gridded.svg +0 -0
  31. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/assets/bench_profile.svg +0 -0
  32. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/guides/attributes.md +0 -0
  33. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/guides/bulk-reads.md +0 -0
  34. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/guides/dask.md +0 -0
  35. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/guides/datasets-and-arrays.md +0 -0
  36. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/guides/dtypes.md +0 -0
  37. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/guides/durability.md +0 -0
  38. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/guides/xarray.md +0 -0
  39. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/index.md +0 -0
  40. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/installation.md +0 -0
  41. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/quickstart.md +0 -0
  42. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/reference/atlas.md +0 -0
  43. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/reference/dataset-view.md +0 -0
  44. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/reference/xarray-accessor.md +0 -0
  45. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/docs/vs-zarr-netcdf.md +0 -0
  46. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/examples/01_basics.py +0 -0
  47. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/examples/02_xarray.py +0 -0
  48. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/examples/03_dask_streaming.py +0 -0
  49. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/examples/04_meta_formats.py +0 -0
  50. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/examples/05_codecs.py +0 -0
  51. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/examples/06_stats_scan.py +0 -0
  52. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/examples/07_shared_arrays.py +0 -0
  53. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/examples/08_object_store.py +0 -0
  54. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/src/attr.rs +0 -0
  55. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/src/dataset.rs +0 -0
  56. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/src/dtype.rs +0 -0
  57. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/src/error.rs +0 -0
  58. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/src/lib.rs +0 -0
  59. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/src/logging.rs +0 -0
  60. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/src/runtime.rs +0 -0
  61. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/src/store.rs +0 -0
  62. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/tests/GL_PR_BO_JLKU.nc +0 -0
  63. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/tests/test_smoke.py +0 -0
  64. {atlas_python-0.9.0 → atlas_python-0.9.1}/atlas-python/tests/test_xarray.py +0 -0
  65. {atlas_python-0.9.0 → atlas_python-0.9.1}/examples/lifecycle.rs +0 -0
  66. {atlas_python-0.9.0 → atlas_python-0.9.1}/examples/sensor_fleet.rs +0 -0
  67. {atlas_python-0.9.0 → atlas_python-0.9.1}/examples/weather_store.rs +0 -0
  68. {atlas_python-0.9.0 → atlas_python-0.9.1}/python/atlas/__init__.py +0 -0
  69. {atlas_python-0.9.0 → atlas_python-0.9.1}/python/atlas/__init__.pyi +0 -0
  70. {atlas_python-0.9.0 → atlas_python-0.9.1}/python/atlas/py.typed +0 -0
  71. {atlas_python-0.9.0 → atlas_python-0.9.1}/python/atlas/xarray.py +0 -0
  72. {atlas_python-0.9.0 → atlas_python-0.9.1}/src/array.rs +0 -0
  73. {atlas_python-0.9.0 → atlas_python-0.9.1}/src/config.rs +0 -0
  74. {atlas_python-0.9.0 → atlas_python-0.9.1}/src/dataset.rs +0 -0
  75. {atlas_python-0.9.0 → atlas_python-0.9.1}/src/error.rs +0 -0
  76. {atlas_python-0.9.0 → atlas_python-0.9.1}/src/lib.rs +0 -0
  77. {atlas_python-0.9.0 → atlas_python-0.9.1}/src/meta.rs +0 -0
  78. {atlas_python-0.9.0 → atlas_python-0.9.1}/src/schema.rs +0 -0
  79. {atlas_python-0.9.0 → atlas_python-0.9.1}/src/store.rs +0 -0
  80. {atlas_python-0.9.0 → atlas_python-0.9.1}/tests/integration.rs +0 -0
@@ -71,7 +71,7 @@ dependencies = [
71
71
 
72
72
  [[package]]
73
73
  name = "atlas-python"
74
- version = "0.9.0"
74
+ version = "0.9.1"
75
75
  dependencies = [
76
76
  "atlas-rust",
77
77
  "ndarray",
@@ -86,7 +86,7 @@ dependencies = [
86
86
 
87
87
  [[package]]
88
88
  name = "atlas-rust"
89
- version = "0.9.0"
89
+ version = "0.9.1"
90
90
  dependencies = [
91
91
  "array-format",
92
92
  "chrono",
@@ -5,11 +5,11 @@ members = ["atlas-python"]
5
5
  # Registry name on crates.io (`atlas` is taken). The library is still
6
6
  # imported as `atlas` — see `[lib]` below.
7
7
  name = "atlas-rust"
8
- version = "0.9.0"
8
+ version = "0.9.1"
9
9
  edition = "2024"
10
10
  description = "Directory-based store for thousands of N-dimensional datasets local or remote using object storage."
11
11
  license = "Apache-2.0"
12
- repository = "https://github.com/robinskil/atlas"
12
+ repository = "https://github.com/maris-development/atlas"
13
13
  readme = "README.md"
14
14
  keywords = ["array", "ndarray", "scientific", "storage", "object-store"]
15
15
  categories = ["science", "data-structures", "filesystem"]
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright [yyyy] [name of copyright owner]
189
+ Copyright 2026 Robin Kooyman
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -0,0 +1,269 @@
1
+ Metadata-Version: 2.4
2
+ Name: atlas-python
3
+ Version: 0.9.1
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: Intended Audience :: Science/Research
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Rust
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Topic :: Scientific/Engineering
10
+ Requires-Dist: numpy>=1.23
11
+ Requires-Dist: xarray>=2023.1
12
+ Requires-Dist: dask>=2023.1
13
+ Requires-Dist: zarr>=3 ; extra == 'bench'
14
+ Requires-Dist: numcodecs ; extra == 'bench'
15
+ Requires-Dist: netcdf4 ; extra == 'bench'
16
+ Requires-Dist: obstore>=0.9 ; extra == 'cloud'
17
+ Requires-Dist: pytest ; extra == 'test'
18
+ Requires-Dist: netcdf4 ; extra == 'test'
19
+ Provides-Extra: bench
20
+ Provides-Extra: cloud
21
+ Provides-Extra: test
22
+ License-File: LICENSE
23
+ Summary: Python bindings for the ATLAS array store
24
+ Keywords: array,ndarray,xarray,scientific,storage,object-store
25
+ Author-email: Robin Kooyman <robin.kooyman.work@gmail.com>
26
+ License-Expression: Apache-2.0
27
+ Requires-Python: >=3.10
28
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
29
+ Project-URL: Homepage, https://github.com/maris-development/atlas
30
+ Project-URL: Issues, https://github.com/maris-development/atlas/issues
31
+ Project-URL: Repository, https://github.com/maris-development/atlas
32
+
33
+ # atlas-python
34
+
35
+ Python bindings for **ATLAS** (Aggregated Tensor Large Array Store) — a directory-based store
36
+ for many similarly-shaped N-dimensional arrays, backed by local files or any object store
37
+ (S3 / GCS / Azure / HTTP). Built on a Rust core with a synchronous, NumPy-native API and
38
+ first-class [xarray](https://docs.xarray.dev) integration.
39
+
40
+ ```bash
41
+ pip install atlas-python
42
+ ```
43
+
44
+ ```python
45
+ import atlas
46
+ ```
47
+
48
+ | Extra | Install | Adds |
49
+ | --- | --- | --- |
50
+ | cloud | `pip install "atlas-python[cloud]"` | S3 / GCS / Azure / HTTP backends via [obstore](https://github.com/developmentseed/obstore) |
51
+
52
+ `numpy`, `xarray`, and `dask` are installed automatically.
53
+
54
+ ## Quick start
55
+
56
+ ```python
57
+ import numpy as np
58
+ import atlas
59
+
60
+ # The `with` block flushes (== close) on exit. Nothing is persisted before that.
61
+ with atlas.Atlas.create("/tmp/my_store", codec="zstd") as store: # "zstd" | "lz4" | "none"
62
+ ds = store.create_dataset("jan_2024")
63
+ ds.define_array(
64
+ "temperature",
65
+ dtype="float32",
66
+ dims=["lat", "lon"],
67
+ shape=[8, 16],
68
+ chunk_shape=[4, 8],
69
+ fill_value=float("nan"), # unwritten cells read back as NaN; NaN cells count as nulls in stats
70
+ )
71
+ ds.write_array("temperature", start=[0, 0], data=np.full((8, 16), 20.0, dtype=np.float32))
72
+ ds.set_attribute("month", 1)
73
+ ds.set_attribute("station", "KNMI")
74
+
75
+ # Reopen and read
76
+ store = atlas.Atlas.open("/tmp/my_store")
77
+ ds = store.open_dataset("jan_2024")
78
+ arr = ds.read_array("temperature") # full read -> np.ndarray
79
+ chunk = ds.read_array("temperature", [0, 0], [4, 8]) # partial read
80
+ stats = ds.array_stats("temperature") # {"row_count", "null_count", "min", "max"}
81
+ month = ds.get_attribute("month") # 1
82
+ ```
83
+
84
+ ## Durability model
85
+
86
+ This is the one concept to internalise: **writes are buffered in memory and only hit disk on
87
+ `flush()`.**
88
+
89
+ The store's metadata is loaded once on `open`/`create`. Every subsequent mutation — creating
90
+ datasets, defining arrays, `write_array`, `set_attribute` — updates in-memory state only.
91
+ **Nothing reaches disk until `store.flush()` (equivalently `store.close()`, or the `with store:`
92
+ block exiting).** Dropping an `Atlas` without flushing abandons every pending write.
93
+
94
+ The payoff: N consecutive writes amortise to a single flush — one delta file per touched array
95
+ name and one metadata rewrite, no matter how many datasets you touched.
96
+
97
+ ```python
98
+ store = atlas.Atlas.create("/tmp/my_store")
99
+ # ... many create_dataset / write_array calls ...
100
+ store.flush() # the single durability boundary
101
+ ```
102
+
103
+ ## xarray integration
104
+
105
+ Importing `atlas` registers an accessor at `xr.Dataset.atlas`, so the integration is always
106
+ available. The store must exist first; you then append xarray datasets to it.
107
+
108
+ ```python
109
+ import numpy as np, xarray as xr, atlas
110
+
111
+ ds = xr.Dataset(
112
+ data_vars={
113
+ "temperature": (["lat", "lon"], np.arange(8 * 16, dtype=np.float32).reshape(8, 16),
114
+ {"units": "C", "long_name": "surface temperature"}),
115
+ },
116
+ coords={"lat": np.arange(8, dtype=np.float32), "lon": np.arange(16, dtype=np.float32)},
117
+ attrs={"month": 1, "station": "KNMI"},
118
+ )
119
+
120
+ with atlas.Atlas.create("/tmp/my_store") as store:
121
+ store.add_xr_dataset(ds, "jan_2024") # store-side method
122
+ ds.atlas.write(store, "jan_2025") # xarray accessor (same effect)
123
+
124
+ # Read back as an xr.Dataset
125
+ store = atlas.Atlas.open("/tmp/my_store")
126
+ ds_back = store.to_xarray("jan_2024")
127
+ xr.testing.assert_identical(ds, ds_back)
128
+ ```
129
+
130
+ ### Bulk ingestion
131
+
132
+ `add_xr_dataset` never flushes by itself — N consecutive calls accumulate in memory and a single
133
+ `flush()` (or the `with` exit) persists everything.
134
+
135
+ ```python
136
+ import glob, os, atlas, xarray as xr
137
+
138
+ with atlas.Atlas.create("/tmp/store") as store:
139
+ for nc_path in sorted(glob.glob("*.nc")):
140
+ name = os.path.splitext(os.path.basename(nc_path))[0]
141
+ store.add_xr_dataset(xr.open_dataset(nc_path), name)
142
+ # One delta file per array name across the whole batch (not one per file).
143
+ ```
144
+
145
+ ### Streaming dask-backed writes
146
+
147
+ If a variable's `.data` is a `dask.array.Array` (e.g. from `xr.open_dataset(path, chunks=...)`
148
+ or `ds.chunk({...})`), `add_xr_dataset` / `ds.atlas.write` stream **one dask block at a time**
149
+ into the store rather than materialising the whole array. The dask chunk shape becomes the
150
+ on-disk `chunk_shape`, so the layout maps 1:1. Peak memory ≈ one chunk per variable.
151
+
152
+ ```python
153
+ ds = xr.open_dataset("big.nc", chunks={"time": 100, "lat": -1, "lon": -1})
154
+ with atlas.Atlas.create("/tmp/store") as store:
155
+ store.add_xr_dataset(ds, "big") # streams chunk-by-chunk
156
+ ```
157
+
158
+ Pass `chunks={var: [...]}` to `add_xr_dataset` / `ds.atlas.write` to override the on-disk chunk
159
+ shape independently of dask's chunking.
160
+
161
+ ### Lazy dask-backed reads
162
+
163
+ `store.to_xarray(name)` returns each variable dask-backed whenever it was stored with non-trivial
164
+ chunking (`chunk_shape != shape`); the dask `chunks` tuple mirrors the on-disk chunk grid and each
165
+ on-disk chunk is one dask task. Full-shape arrays (and 0-D scalars) come back eager as numpy. Call
166
+ `.compute()` to materialise, or slice / `map_blocks` to operate lazily.
167
+
168
+ ```python
169
+ ds_back = atlas.Atlas.open("/tmp/store").to_xarray("big")
170
+ ds_back["temperature"].data # -> dask.array.Array
171
+ ds_back["temperature"][0:100].compute() # reads exactly one chunk
172
+ ```
173
+
174
+ Reads run under dask's **threaded** scheduler only — the `DatasetView` captured in the graph isn't
175
+ picklable, so call `.compute()` before handing off to distributed/multiprocessing schedulers.
176
+
177
+ ### How xarray maps onto the store
178
+
179
+ | Item | How it's stored |
180
+ | --- | --- |
181
+ | Each coord / data variable | A separate array, with `dims` mapped 1:1. |
182
+ | Dataset attrs | Dataset attributes, plain keys. |
183
+ | Per-variable attrs | Flattened as `{var}.{attr}` at the dataset attr level. |
184
+ | Per-variable `_FillValue` | Consumed by `define_array` as a typed fill value (source `Dataset.attrs` is not mutated). |
185
+ | Coord vs data_var distinction | JSON list in the internal `_pyatlas_coords` attr. |
186
+ | Non-scalar attr values (list, ndarray) | JSON-encoded string with a `json:` prefix marker. |
187
+
188
+ Each `add_xr_dataset` / `ds.atlas.write` creates a *new* dataset — there is no append-into-existing
189
+ mode.
190
+
191
+ ## Supported dtypes
192
+
193
+ | numpy dtype | atlas dtype |
194
+ | --- | --- |
195
+ | `int8/16/32/64`, `uint8/16/32/64`, `float32/64` | matching numeric |
196
+ | `datetime64[ns]` | `timestamp_nanoseconds` (aliases: `timestamp_ns`, `datetime64[ns]`) |
197
+ | `object` (`str`/`bytes`), `\|S<n>`, `\|U<n>` | `string` (variable-length; reads return Python `str`) |
198
+
199
+ - 0-D scalar arrays (`shape=[]`) are supported for every dtype above.
200
+ - `bool` is available as an *attribute* type but not as an array dtype.
201
+ - `binary`, `list[...]`, `fixed_size_list[...,N]` are reserved for a later release.
202
+
203
+ ## Cloud / object storage
204
+
205
+ With the `cloud` extra, `Atlas.open` / `Atlas.create` accept an
206
+ [obstore](https://github.com/developmentseed/obstore)-constructed S3 / GCS / Azure / HTTP store
207
+ handle instead of a local path. The path-based local-filesystem API works without it. See the
208
+ [cloud storage guide](https://github.com/maris-development/atlas/blob/main/atlas-python/docs/guides/cloud-storage.md).
209
+
210
+ ## API reference
211
+
212
+ ### `atlas.Atlas`
213
+
214
+ | Method | Description |
215
+ | --- | --- |
216
+ | `Atlas.create(path, codec="zstd")` | Create a new store at `path`. |
217
+ | `Atlas.open(path)` | Open an existing store. |
218
+ | `create_dataset(name) -> DatasetView` | New dataset (in-memory until flush). |
219
+ | `open_dataset(name) -> DatasetView` | Existing dataset. |
220
+ | `delete_dataset(name)` | Remove a dataset (persisted on next `flush`). |
221
+ | `list_datasets() -> list[str]` | All dataset names. |
222
+ | `list_arrays() -> list[str]` | Distinct array names across datasets. |
223
+ | `dataset_exists(name) -> bool` | Existence check. |
224
+ | `add_xr_dataset(ds, name, chunks=None)` | Append an `xarray.Dataset` (does **not** flush). |
225
+ | `to_xarray(name) -> xr.Dataset` | Read a dataset back (chunked vars come back dask-backed). |
226
+ | `flush()` | The single durability boundary — persist everything. |
227
+ | `close()` | Alias for `flush()`; also the `with`-block exit. |
228
+ | `compact()` | Reclaim tombstoned space across cached array files. |
229
+ | `__enter__` / `__exit__` | Context-manager support (`__exit__` calls `close()`). |
230
+
231
+ ### `atlas.DatasetView`
232
+
233
+ | Method | Description |
234
+ | --- | --- |
235
+ | `name` (property) | Dataset name. |
236
+ | `list_arrays() -> list[str]` | Array names in this dataset. |
237
+ | `define_array(name, dtype, dims, shape, chunk_shape=None, fill_value=None)` | Declare a new array. `fill_value` is a Python scalar matching the dtype; unwritten cells read back as it, and *written* cells equal to it count as nulls in `array_stats`. Dtype is enforced (`TypeError` on mismatch, `OverflowError` for out-of-range ints). |
238
+ | `write_array(name, start, data)` | Write a numpy ndarray (matching the stored dtype). |
239
+ | `read_array(name, start=None, shape=None) -> np.ndarray \| None` | Read full or partial; `None` if the array isn't in this dataset. |
240
+ | `delete_array(name)` | Tombstone the array within this dataset. |
241
+ | `array_meta(name) -> dict \| None` | `{"dtype", "shape", "chunk_shape", "dimension_names"}`. |
242
+ | `array_stats(name) -> dict \| None` | `{"row_count", "null_count", "min", "max"}` — populated after `flush()`. |
243
+ | `set_attribute(key, value, dtype=None)` | Type inferred from the Python value; pass `dtype` to override (e.g. `"int8"`, `"float32"`, `"timestamp_nanoseconds"`). On disk: bool, int64, float64, string, timestamp_nanoseconds. |
244
+ | `get_attribute(key)` / `attributes()` | Single attribute or dict of all. |
245
+
246
+ `DatasetView` does **not** expose its own `flush` / `compact` — both go through the parent `Atlas`.
247
+
248
+ ## Examples
249
+
250
+ Runnable, self-contained scripts (each writes to a temp directory):
251
+
252
+ - [01_basics.py](https://github.com/maris-development/atlas/blob/main/atlas-python/examples/01_basics.py) — create a store, define arrays, set attributes, reopen, read back.
253
+ - [02_xarray.py](https://github.com/maris-development/atlas/blob/main/atlas-python/examples/02_xarray.py) — round-trip an `xr.Dataset` via both `store.add_xr_dataset(...)` and the `ds.atlas.write(...)` accessor.
254
+ - [03_dask_streaming.py](https://github.com/maris-development/atlas/blob/main/atlas-python/examples/03_dask_streaming.py) — stream a dask-chunked `xr.Dataset` in one chunk at a time.
255
+
256
+ ## Performance
257
+
258
+ ATLAS is tuned for collections of many similarly-shaped datasets. On a "1000 datasets" benchmark
259
+ against netCDF4 and Zarr v3, the bulk read paths (`Atlas.to_xarray_many` /
260
+ `Atlas.read_array_across_stacked`) beat Zarr by ~2.8× on large chunked slice reads, and on small
261
+ per-dataset workloads ATLAS leads on both reads and writes. See the
262
+ [benchmarks](https://github.com/maris-development/atlas/tree/main/atlas-python/benchmarks) for the full
263
+ methodology, numbers, and an API picker for the fastest read path per workload.
264
+
265
+ ## Links
266
+
267
+ - Source & issues: <https://github.com/maris-development/atlas>
268
+ - License: Apache-2.0
269
+
@@ -2,6 +2,12 @@
2
2
 
3
3
  A directory-based store for thousands of named datasets, each holding N-dimensional typed arrays. Built on top of the [`array-format`](https://github.com/robinskil/array-format) (`.af`) binary format, with configurable compression (Zstd, LZ4, or none), chunked I/O, and an [`object_store`](https://crates.io/crates/object_store) backend that works on local disk, S3, GCS, Azure Blob, and in-memory.
4
4
 
5
+ **Think of it as a "zip" for N-dimensional datasets.** Where a `.zip` bundles many files into one archive, ATLAS gathers many NetCDF / Zarr-style datasets — anything that's a set of named N-dimensional arrays — into a single high-performance collection. But it's more than a bundle: instead of storing each dataset whole, ATLAS lays the data out **variable-first**, so every dataset's `temperature` lives in one file. That makes it cheap to scan or slice a single variable across thousands of datasets at once, while still reading back any individual dataset as a normal NetCDF/xarray-like object.
6
+
7
+ > **Looking for Python?** The Python bindings live in [`atlas-python/`](atlas-python/) — `pip install atlas-python`, then `import atlas`. They add a NumPy-native API and first-class [xarray](https://docs.xarray.dev) integration. See the [atlas-python README](atlas-python/README.md) for usage.
8
+ >
9
+ > The rest of this document covers **how the format works and the Rust crate**.
10
+
5
11
  ---
6
12
 
7
13
  ## What it does
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "atlas-python"
3
- version = "0.9.0"
3
+ version = "0.9.1"
4
4
  edition = "2021"
5
5
  readme = "README.md"
6
6
 
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Robin Kooyman
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.