tilebox-datasets 0.37.0__py3-none-any.whl → 0.37.1__py3-none-any.whl
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.
- tilebox/datasets/client.py +4 -1
- tilebox/datasets/data/timeseries.py +7 -1
- {tilebox_datasets-0.37.0.dist-info → tilebox_datasets-0.37.1.dist-info}/METADATA +3 -3
- {tilebox_datasets-0.37.0.dist-info → tilebox_datasets-0.37.1.dist-info}/RECORD +5 -5
- {tilebox_datasets-0.37.0.dist-info → tilebox_datasets-0.37.1.dist-info}/WHEEL +0 -0
tilebox/datasets/client.py
CHANGED
|
@@ -6,6 +6,7 @@ from uuid import UUID
|
|
|
6
6
|
from loguru import logger
|
|
7
7
|
from promise import Promise
|
|
8
8
|
|
|
9
|
+
from _tilebox.grpc.channel import parse_channel_info
|
|
9
10
|
from tilebox.datasets.data.datasets import Dataset, DatasetGroup, ListDatasetsResponse
|
|
10
11
|
from tilebox.datasets.data.uuid import as_uuid
|
|
11
12
|
from tilebox.datasets.group import Group
|
|
@@ -66,11 +67,13 @@ class Client:
|
|
|
66
67
|
def token_from_env(url: str, token: str | None) -> str | None:
|
|
67
68
|
if token is None: # if no token is provided, try to get it from the environment
|
|
68
69
|
token = os.environ.get("TILEBOX_API_KEY", None)
|
|
69
|
-
|
|
70
|
+
|
|
71
|
+
if token is None and parse_channel_info(url).address == "api.tilebox.com":
|
|
70
72
|
raise ValueError(
|
|
71
73
|
"No API key provided and no TILEBOX_API_KEY environment variable set. Please specify an API key using "
|
|
72
74
|
"the token argument. For example: `Client(token='YOUR_TILEBOX_API_KEY')`"
|
|
73
75
|
)
|
|
76
|
+
|
|
74
77
|
return token
|
|
75
78
|
|
|
76
79
|
|
|
@@ -21,7 +21,13 @@ class TimeseriesDatasetChunk:
|
|
|
21
21
|
@classmethod
|
|
22
22
|
def from_message(cls, chunk: timeseries_pb2.TimeseriesDatasetChunk) -> "TimeseriesDatasetChunk":
|
|
23
23
|
datapoint_interval = None
|
|
24
|
-
if
|
|
24
|
+
if (
|
|
25
|
+
chunk.datapoint_interval
|
|
26
|
+
and chunk.datapoint_interval.start_id
|
|
27
|
+
and chunk.datapoint_interval.end_id
|
|
28
|
+
and chunk.datapoint_interval.start_id.uuid
|
|
29
|
+
and chunk.datapoint_interval.end_id.uuid
|
|
30
|
+
):
|
|
25
31
|
datapoint_interval = DatapointInterval.from_message(chunk.datapoint_interval)
|
|
26
32
|
|
|
27
33
|
time_interval = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tilebox-datasets
|
|
3
|
-
Version: 0.37.
|
|
3
|
+
Version: 0.37.1
|
|
4
4
|
Summary: Access Tilebox datasets from Python
|
|
5
5
|
Project-URL: Homepage, https://tilebox.com
|
|
6
6
|
Project-URL: Documentation, https://docs.tilebox.com/datasets/introduction
|
|
@@ -98,7 +98,7 @@ Query data:
|
|
|
98
98
|
```python
|
|
99
99
|
s2a_l1c = sentinel2_msi.collection("S2A_S2MSI1C")
|
|
100
100
|
results = s2a_l1c.query(
|
|
101
|
-
temporal_extent=("
|
|
101
|
+
temporal_extent=("2025-03-01", "2025-06-01"),
|
|
102
102
|
show_progress=True
|
|
103
103
|
)
|
|
104
104
|
print(f"Found {results.sizes['time']} datapoints") # Found 220542 datapoints
|
|
@@ -115,7 +115,7 @@ area_of_interest = shape({
|
|
|
115
115
|
)
|
|
116
116
|
s2a_l1c = sentinel2_msi.collection("S2A_S2MSI1C")
|
|
117
117
|
results = s2a_l1c.query(
|
|
118
|
-
temporal_extent=("
|
|
118
|
+
temporal_extent=("2025-03-01", "2025-06-01"),
|
|
119
119
|
spatial_extent=area_of_interest,
|
|
120
120
|
show_progress=True
|
|
121
121
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
tilebox/datasets/__init__.py,sha256=4fI6ErCVb15KD_iPWIM6TUXTPgU8qrJVx3Cx7m7jeC8,824
|
|
2
|
-
tilebox/datasets/client.py,sha256=
|
|
2
|
+
tilebox/datasets/client.py,sha256=Uv_Pa3nTRKktbPTvxYDh1t_JwcjQMAoZjlqVJe4sZ6o,4081
|
|
3
3
|
tilebox/datasets/group.py,sha256=DoGl4w7Viy-l4kE9580dJOymP_B2pj3LRqvMNxvrYmU,1884
|
|
4
4
|
tilebox/datasets/message_pool.py,sha256=vndyPAR_X_rgGVvOTTBarkONTFpRSATB-3toO0oFUrw,1271
|
|
5
5
|
tilebox/datasets/progress.py,sha256=NC3YFnK4EqspCH0QPKsAHmkzoAl5KHedPWYvdS37Tp8,3516
|
|
@@ -16,7 +16,7 @@ tilebox/datasets/data/datapoint.py,sha256=eM1fS8s5LjH6ENFxJckdl_-1v9KJAEGLFx5XWx
|
|
|
16
16
|
tilebox/datasets/data/datasets.py,sha256=mOp5MHE4oktUcUB9Q3n1emA_zv3LjXT6gc7m0rLzYNQ,4238
|
|
17
17
|
tilebox/datasets/data/pagination.py,sha256=X3mNNm3EF6m5dH3zwRkGvqqcnyFvEG5OrMVGX2Wm3wM,775
|
|
18
18
|
tilebox/datasets/data/time_interval.py,sha256=CADKc0xxf5PYwF2VsQ2GVi4JapwBQ6-JXrVV8VHv-so,9737
|
|
19
|
-
tilebox/datasets/data/timeseries.py,sha256=
|
|
19
|
+
tilebox/datasets/data/timeseries.py,sha256=qAhIOczp74E18sXQ2j5Mc3_NJd5zgosgSRm3lWQ3zlk,3632
|
|
20
20
|
tilebox/datasets/data/uuid.py,sha256=cmsGCBEj7AOTsCNN6JELaoI2CGQBVzxfL7JPs-x_JTw,1081
|
|
21
21
|
tilebox/datasets/datasetsv1/collections_pb2.py,sha256=8Ax9D85AnfchVjmuTlvE6WATy0DNr_37uDAwh8i3ZB0,3415
|
|
22
22
|
tilebox/datasets/datasetsv1/collections_pb2.pyi,sha256=CcjNu9HSi2zyKcC3GWYPRBFeDTjfkd36SEO-WYIiBQQ,1749
|
|
@@ -51,6 +51,6 @@ tilebox/datasets/sync/client.py,sha256=d6d2ABi9Lo9oIgpnq_1O0v4JqJrppaP4hCT5TWWXH
|
|
|
51
51
|
tilebox/datasets/sync/dataset.py,sha256=B_02i30p_lNVtDSftWNSSyRygfOzFStjUIe5U-LWGr4,21584
|
|
52
52
|
tilebox/datasets/sync/pagination.py,sha256=Wn_rHwKr4fW31y0fCQFLvcn6jumqkerT3UeWeVpOVzk,6019
|
|
53
53
|
tilebox/datasets/sync/timeseries.py,sha256=4nTP8_tmv6V7PXTUNzzlbzlxv0OXo_IqVLtSdJpUOW0,303
|
|
54
|
-
tilebox_datasets-0.37.
|
|
55
|
-
tilebox_datasets-0.37.
|
|
56
|
-
tilebox_datasets-0.37.
|
|
54
|
+
tilebox_datasets-0.37.1.dist-info/METADATA,sha256=BP9LrYPruoZy3F3oTDz-93eGm72RPbNYA9k5uPb6EL0,4234
|
|
55
|
+
tilebox_datasets-0.37.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
56
|
+
tilebox_datasets-0.37.1.dist-info/RECORD,,
|
|
File without changes
|