cdsetool 0.3.1__tar.gz → 0.3.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdsetool
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Tools & CLI for interacting with CDSE product APIs
5
5
  Author-email: Jacob Vejby <javej@sdfi.dk>
6
6
  Project-URL: Homepage, https://github.com/CDSETool/CDSETool
@@ -13,7 +13,7 @@ License-File: LICENSE
13
13
  Requires-Dist: typer<1,>=0.9
14
14
  Requires-Dist: rich<16,>=13.6
15
15
  Requires-Dist: requests<3,>=2.28.1
16
- Requires-Dist: pyjwt[crypto]<2.13,>=2.8
16
+ Requires-Dist: pyjwt[crypto]<2.15,>=2.8
17
17
  Requires-Dist: geopandas>=0.13.2
18
18
  Provides-Extra: test
19
19
  Requires-Dist: pylint==3.3.9; extra == "test"
@@ -95,7 +95,7 @@ cdsetool download SENTINEL-2 PATH/TO/DIR --concurrency 4 --search-term contentDa
95
95
  Install `cdsetool` using pip:
96
96
 
97
97
  ```bash
98
- pip install cdsetool==0.3.1
98
+ pip install cdsetool==0.3.2
99
99
  ```
100
100
 
101
101
  ## Usage
@@ -155,8 +155,8 @@ product = {
155
155
  "Attributes": [
156
156
  {"Name": "productType", "Value": "S2MSI2A"},
157
157
  {"Name": "cloudCover", "Value": 5.2},
158
- ...
159
- ]
158
+ ...,
159
+ ],
160
160
  }
161
161
  ```
162
162
 
@@ -170,13 +170,13 @@ from cdsetool.query import query_features, get_product_attribute
170
170
  features = query_features(
171
171
  "SENTINEL-2",
172
172
  {"contentDateStartGe": "2024-01-01"},
173
- options={"expand_attributes": True}
173
+ options={"expand_attributes": True},
174
174
  )
175
175
  feature = features[0]
176
176
 
177
177
  # Access basic properties directly
178
178
  print(feature["Name"]) # Product name
179
- print(feature["Id"]) # Product UUID
179
+ print(feature["Id"]) # Product UUID
180
180
 
181
181
  # Access attributes using helper function
182
182
  cloud_cover = get_product_attribute(feature, "cloudCover")
@@ -240,10 +240,19 @@ Interval syntax is only allowed on the base name, not on suffixed variants, and
240
240
  from cdsetool.query import query_features
241
241
  from datetime import date, datetime
242
242
 
243
- date_from = date(2020, 1, 1) # or datetime(2020, 1, 1, 23, 59, 59, 123456) or "2020-01-01" or "2020-01-01T23:59:59.123456Z"
243
+ date_from = date(
244
+ 2020, 1, 1
245
+ ) # or datetime(2020, 1, 1, 23, 59, 59, 123456) or "2020-01-01" or "2020-01-01T23:59:59.123456Z"
244
246
  date_to = date(2020, 12, 31)
245
247
 
246
- features = query_features("SENTINEL-2", {"contentDateStartGe": date_from, "contentDateStartLe": date_to, "cloudCover": "[0, 30]"})
248
+ features = query_features(
249
+ "SENTINEL-2",
250
+ {
251
+ "contentDateStartGe": date_from,
252
+ "contentDateStartLe": date_to,
253
+ "cloudCover": "[0, 30]",
254
+ },
255
+ )
247
256
  ```
248
257
 
249
258
  #### Listing search terms
@@ -307,7 +316,7 @@ Credentials can be validated using the `validate_credentials` function which wil
307
316
  ```python
308
317
  from cdsetool.credentials import validate_credentials
309
318
 
310
- validate_credentials(username='user', password='password')
319
+ validate_credentials(username="user", password="password")
311
320
  ```
312
321
 
313
322
  If None are passed to username and password, `validate_credentials` will validate `.netrc`
@@ -324,7 +333,10 @@ The downloaded feature ids are yielded, so its required to await the results.
324
333
  from cdsetool.query import query_features
325
334
  from cdsetool.download import download_features
326
335
 
327
- features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
336
+ features = query_features(
337
+ "SENTINEL-2",
338
+ {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
339
+ )
328
340
 
329
341
  download_path = "/path/to/download/folder"
330
342
  downloads = download_features(features, download_path, {"concurrency": 4})
@@ -345,7 +357,10 @@ Its possible to download features sequentially in a single thread if desired.
345
357
  from cdsetool.query import query_features
346
358
  from cdsetool.download import download_feature
347
359
 
348
- features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
360
+ features = query_features(
361
+ "SENTINEL-2",
362
+ {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
363
+ )
349
364
 
350
365
  download_path = "/path/to/download/folder"
351
366
  for feature in features:
@@ -363,11 +378,16 @@ It can be used in CDSETool:
363
378
  from cdsetool.query import query_features
364
379
  from cdsetool.download import download_features
365
380
 
366
- features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
381
+ features = query_features(
382
+ "SENTINEL-2",
383
+ {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
384
+ )
367
385
 
368
386
  download_path = "/path/to/download/folder"
369
387
  filter_pattern = "*TCI.jp2"
370
- downloads = download_features(features, download_path, {"filter_pattern": filter_pattern})
388
+ downloads = download_features(
389
+ features, download_path, {"filter_pattern": filter_pattern}
390
+ )
371
391
 
372
392
  for id in downloads:
373
393
  print(f"feature {id} downloaded")
@@ -70,7 +70,7 @@ cdsetool download SENTINEL-2 PATH/TO/DIR --concurrency 4 --search-term contentDa
70
70
  Install `cdsetool` using pip:
71
71
 
72
72
  ```bash
73
- pip install cdsetool==0.3.1
73
+ pip install cdsetool==0.3.2
74
74
  ```
75
75
 
76
76
  ## Usage
@@ -130,8 +130,8 @@ product = {
130
130
  "Attributes": [
131
131
  {"Name": "productType", "Value": "S2MSI2A"},
132
132
  {"Name": "cloudCover", "Value": 5.2},
133
- ...
134
- ]
133
+ ...,
134
+ ],
135
135
  }
136
136
  ```
137
137
 
@@ -145,13 +145,13 @@ from cdsetool.query import query_features, get_product_attribute
145
145
  features = query_features(
146
146
  "SENTINEL-2",
147
147
  {"contentDateStartGe": "2024-01-01"},
148
- options={"expand_attributes": True}
148
+ options={"expand_attributes": True},
149
149
  )
150
150
  feature = features[0]
151
151
 
152
152
  # Access basic properties directly
153
153
  print(feature["Name"]) # Product name
154
- print(feature["Id"]) # Product UUID
154
+ print(feature["Id"]) # Product UUID
155
155
 
156
156
  # Access attributes using helper function
157
157
  cloud_cover = get_product_attribute(feature, "cloudCover")
@@ -215,10 +215,19 @@ Interval syntax is only allowed on the base name, not on suffixed variants, and
215
215
  from cdsetool.query import query_features
216
216
  from datetime import date, datetime
217
217
 
218
- date_from = date(2020, 1, 1) # or datetime(2020, 1, 1, 23, 59, 59, 123456) or "2020-01-01" or "2020-01-01T23:59:59.123456Z"
218
+ date_from = date(
219
+ 2020, 1, 1
220
+ ) # or datetime(2020, 1, 1, 23, 59, 59, 123456) or "2020-01-01" or "2020-01-01T23:59:59.123456Z"
219
221
  date_to = date(2020, 12, 31)
220
222
 
221
- features = query_features("SENTINEL-2", {"contentDateStartGe": date_from, "contentDateStartLe": date_to, "cloudCover": "[0, 30]"})
223
+ features = query_features(
224
+ "SENTINEL-2",
225
+ {
226
+ "contentDateStartGe": date_from,
227
+ "contentDateStartLe": date_to,
228
+ "cloudCover": "[0, 30]",
229
+ },
230
+ )
222
231
  ```
223
232
 
224
233
  #### Listing search terms
@@ -282,7 +291,7 @@ Credentials can be validated using the `validate_credentials` function which wil
282
291
  ```python
283
292
  from cdsetool.credentials import validate_credentials
284
293
 
285
- validate_credentials(username='user', password='password')
294
+ validate_credentials(username="user", password="password")
286
295
  ```
287
296
 
288
297
  If None are passed to username and password, `validate_credentials` will validate `.netrc`
@@ -299,7 +308,10 @@ The downloaded feature ids are yielded, so its required to await the results.
299
308
  from cdsetool.query import query_features
300
309
  from cdsetool.download import download_features
301
310
 
302
- features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
311
+ features = query_features(
312
+ "SENTINEL-2",
313
+ {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
314
+ )
303
315
 
304
316
  download_path = "/path/to/download/folder"
305
317
  downloads = download_features(features, download_path, {"concurrency": 4})
@@ -320,7 +332,10 @@ Its possible to download features sequentially in a single thread if desired.
320
332
  from cdsetool.query import query_features
321
333
  from cdsetool.download import download_feature
322
334
 
323
- features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
335
+ features = query_features(
336
+ "SENTINEL-2",
337
+ {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
338
+ )
324
339
 
325
340
  download_path = "/path/to/download/folder"
326
341
  for feature in features:
@@ -338,11 +353,16 @@ It can be used in CDSETool:
338
353
  from cdsetool.query import query_features
339
354
  from cdsetool.download import download_features
340
355
 
341
- features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
356
+ features = query_features(
357
+ "SENTINEL-2",
358
+ {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
359
+ )
342
360
 
343
361
  download_path = "/path/to/download/folder"
344
362
  filter_pattern = "*TCI.jp2"
345
- downloads = download_features(features, download_path, {"filter_pattern": filter_pattern})
363
+ downloads = download_features(
364
+ features, download_path, {"filter_pattern": filter_pattern}
365
+ )
346
366
 
347
367
  for id in downloads:
348
368
  print(f"feature {id} downloaded")
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cdsetool"
7
- version = "0.3.1"
7
+ version = "0.3.2"
8
8
  authors = [
9
9
  { name="Jacob Vejby", email="javej@sdfi.dk" },
10
10
  ]
@@ -19,12 +19,12 @@ dependencies = [
19
19
  "typer >= 0.9,< 1",
20
20
  "rich >= 13.6,< 16",
21
21
  "requests >= 2.28.1,< 3",
22
- "pyjwt[crypto] >= 2.8,< 2.13",
22
+ "pyjwt[crypto] >= 2.8,< 2.15",
23
23
  "geopandas >= 0.13.2",
24
24
  ]
25
25
  [dependency-groups]
26
26
  dev = [
27
- "ruff==0.15.11",
27
+ "ruff==0.16.7",
28
28
  ]
29
29
  # (Jan 30 2025) Pip does not support dependency-groups yet, so
30
30
  # leave the optional dependencies for everything except Ruff.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cdsetool
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Tools & CLI for interacting with CDSE product APIs
5
5
  Author-email: Jacob Vejby <javej@sdfi.dk>
6
6
  Project-URL: Homepage, https://github.com/CDSETool/CDSETool
@@ -13,7 +13,7 @@ License-File: LICENSE
13
13
  Requires-Dist: typer<1,>=0.9
14
14
  Requires-Dist: rich<16,>=13.6
15
15
  Requires-Dist: requests<3,>=2.28.1
16
- Requires-Dist: pyjwt[crypto]<2.13,>=2.8
16
+ Requires-Dist: pyjwt[crypto]<2.15,>=2.8
17
17
  Requires-Dist: geopandas>=0.13.2
18
18
  Provides-Extra: test
19
19
  Requires-Dist: pylint==3.3.9; extra == "test"
@@ -95,7 +95,7 @@ cdsetool download SENTINEL-2 PATH/TO/DIR --concurrency 4 --search-term contentDa
95
95
  Install `cdsetool` using pip:
96
96
 
97
97
  ```bash
98
- pip install cdsetool==0.3.1
98
+ pip install cdsetool==0.3.2
99
99
  ```
100
100
 
101
101
  ## Usage
@@ -155,8 +155,8 @@ product = {
155
155
  "Attributes": [
156
156
  {"Name": "productType", "Value": "S2MSI2A"},
157
157
  {"Name": "cloudCover", "Value": 5.2},
158
- ...
159
- ]
158
+ ...,
159
+ ],
160
160
  }
161
161
  ```
162
162
 
@@ -170,13 +170,13 @@ from cdsetool.query import query_features, get_product_attribute
170
170
  features = query_features(
171
171
  "SENTINEL-2",
172
172
  {"contentDateStartGe": "2024-01-01"},
173
- options={"expand_attributes": True}
173
+ options={"expand_attributes": True},
174
174
  )
175
175
  feature = features[0]
176
176
 
177
177
  # Access basic properties directly
178
178
  print(feature["Name"]) # Product name
179
- print(feature["Id"]) # Product UUID
179
+ print(feature["Id"]) # Product UUID
180
180
 
181
181
  # Access attributes using helper function
182
182
  cloud_cover = get_product_attribute(feature, "cloudCover")
@@ -240,10 +240,19 @@ Interval syntax is only allowed on the base name, not on suffixed variants, and
240
240
  from cdsetool.query import query_features
241
241
  from datetime import date, datetime
242
242
 
243
- date_from = date(2020, 1, 1) # or datetime(2020, 1, 1, 23, 59, 59, 123456) or "2020-01-01" or "2020-01-01T23:59:59.123456Z"
243
+ date_from = date(
244
+ 2020, 1, 1
245
+ ) # or datetime(2020, 1, 1, 23, 59, 59, 123456) or "2020-01-01" or "2020-01-01T23:59:59.123456Z"
244
246
  date_to = date(2020, 12, 31)
245
247
 
246
- features = query_features("SENTINEL-2", {"contentDateStartGe": date_from, "contentDateStartLe": date_to, "cloudCover": "[0, 30]"})
248
+ features = query_features(
249
+ "SENTINEL-2",
250
+ {
251
+ "contentDateStartGe": date_from,
252
+ "contentDateStartLe": date_to,
253
+ "cloudCover": "[0, 30]",
254
+ },
255
+ )
247
256
  ```
248
257
 
249
258
  #### Listing search terms
@@ -307,7 +316,7 @@ Credentials can be validated using the `validate_credentials` function which wil
307
316
  ```python
308
317
  from cdsetool.credentials import validate_credentials
309
318
 
310
- validate_credentials(username='user', password='password')
319
+ validate_credentials(username="user", password="password")
311
320
  ```
312
321
 
313
322
  If None are passed to username and password, `validate_credentials` will validate `.netrc`
@@ -324,7 +333,10 @@ The downloaded feature ids are yielded, so its required to await the results.
324
333
  from cdsetool.query import query_features
325
334
  from cdsetool.download import download_features
326
335
 
327
- features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
336
+ features = query_features(
337
+ "SENTINEL-2",
338
+ {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
339
+ )
328
340
 
329
341
  download_path = "/path/to/download/folder"
330
342
  downloads = download_features(features, download_path, {"concurrency": 4})
@@ -345,7 +357,10 @@ Its possible to download features sequentially in a single thread if desired.
345
357
  from cdsetool.query import query_features
346
358
  from cdsetool.download import download_feature
347
359
 
348
- features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
360
+ features = query_features(
361
+ "SENTINEL-2",
362
+ {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
363
+ )
349
364
 
350
365
  download_path = "/path/to/download/folder"
351
366
  for feature in features:
@@ -363,11 +378,16 @@ It can be used in CDSETool:
363
378
  from cdsetool.query import query_features
364
379
  from cdsetool.download import download_features
365
380
 
366
- features = query_features("SENTINEL-2", {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"})
381
+ features = query_features(
382
+ "SENTINEL-2",
383
+ {"contentDateStartGe": "2024-01-01", "contentDateStartLe": "2024-01-10"},
384
+ )
367
385
 
368
386
  download_path = "/path/to/download/folder"
369
387
  filter_pattern = "*TCI.jp2"
370
- downloads = download_features(features, download_path, {"filter_pattern": filter_pattern})
388
+ downloads = download_features(
389
+ features, download_path, {"filter_pattern": filter_pattern}
390
+ )
371
391
 
372
392
  for id in downloads:
373
393
  print(f"feature {id} downloaded")
@@ -1,7 +1,7 @@
1
1
  typer<1,>=0.9
2
2
  rich<16,>=13.6
3
3
  requests<3,>=2.28.1
4
- pyjwt[crypto]<2.13,>=2.8
4
+ pyjwt[crypto]<2.15,>=2.8
5
5
  geopandas>=0.13.2
6
6
 
7
7
  [test]
File without changes
File without changes
File without changes
File without changes
File without changes