ecmwf-datastores-client 0.1.0__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.

Potentially problematic release.


This version of ecmwf-datastores-client might be problematic. Click here for more details.

@@ -0,0 +1,87 @@
1
+ # Copyright 2022, European Union.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ from __future__ import annotations
16
+
17
+ from typing import Any, Callable
18
+
19
+ import attrs
20
+ import requests
21
+
22
+ from ecmwf.datastores import config, processing
23
+
24
+
25
+ @attrs.define(slots=False)
26
+ class Profile:
27
+ url: str
28
+ headers: dict[str, Any]
29
+ session: requests.Session
30
+ retry_options: dict[str, Any]
31
+ request_options: dict[str, Any]
32
+ download_options: dict[str, Any]
33
+ sleep_max: float
34
+ cleanup: bool
35
+ log_callback: Callable[..., None] | None
36
+ force_exact_url: bool = False
37
+
38
+ def __attrs_post_init__(self) -> None:
39
+ if not self.force_exact_url:
40
+ self.url += f"/{config.SUPPORTED_API_VERSION}"
41
+
42
+ @property
43
+ def _request_kwargs(self) -> processing.RequestKwargs:
44
+ return processing.RequestKwargs(
45
+ headers=self.headers,
46
+ session=self.session,
47
+ retry_options=self.retry_options,
48
+ request_options=self.request_options,
49
+ download_options=self.download_options,
50
+ sleep_max=self.sleep_max,
51
+ cleanup=self.cleanup,
52
+ log_callback=self.log_callback,
53
+ )
54
+
55
+ def _get_api_response(
56
+ self, method: str, url: str, **kwargs: Any
57
+ ) -> processing.ApiResponse:
58
+ return processing.ApiResponse.from_request(
59
+ method,
60
+ url,
61
+ **self._request_kwargs,
62
+ **kwargs,
63
+ )
64
+
65
+ def accept_licence(self, licence_id: str, revision: int) -> dict[str, Any]:
66
+ url = f"{self.url}/account/licences/{licence_id}"
67
+ return self._get_api_response(
68
+ "put", url, json={"revision": revision}
69
+ )._json_dict
70
+
71
+ def accepted_licences(self, **params: Any) -> dict[str, Any]:
72
+ url = f"{self.url}/account/licences"
73
+ return self._get_api_response("get", url, params=params)._json_dict
74
+
75
+ def check_authentication(self) -> dict[str, Any]:
76
+ url = f"{self.url}/account/verification/pat"
77
+ return self._get_api_response("post", url)._json_dict
78
+
79
+ def star_collection(self, collection_id: str) -> list[str]:
80
+ url = f"{self.url}/account/starred"
81
+ return self._get_api_response(
82
+ "post", url, json={"uid": collection_id}, log_messages=False
83
+ )._json_list
84
+
85
+ def unstar_collection(self, collection_id: str) -> None:
86
+ url = f"{self.url}/account/starred/{collection_id}"
87
+ self._get_api_response("delete", url, log_messages=False)
File without changes
@@ -0,0 +1,9 @@
1
+ import datetime
2
+
3
+
4
+ def string_to_datetime(string: str) -> datetime.datetime:
5
+ string = string.replace("Z", "+00:00") # Support python<3.11
6
+ date_time = datetime.datetime.fromisoformat(string)
7
+ if date_time.tzinfo is None:
8
+ date_time = date_time.replace(tzinfo=datetime.timezone.utc)
9
+ return date_time
@@ -0,0 +1,2 @@
1
+ # Do not change! Do not track in version control!
2
+ __version__ = "0.1.0"
@@ -0,0 +1,531 @@
1
+ Metadata-Version: 2.4
2
+ Name: ecmwf-datastores-client
3
+ Version: 0.1.0
4
+ Summary: ECMWF Data Stores Service (DSS) API Python client
5
+ License: Apache License
6
+ Version 2.0, January 2004
7
+ http://www.apache.org/licenses/
8
+
9
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10
+
11
+ 1. Definitions.
12
+
13
+ "License" shall mean the terms and conditions for use, reproduction,
14
+ and distribution as defined by Sections 1 through 9 of this document.
15
+
16
+ "Licensor" shall mean the copyright owner or entity authorized by
17
+ the copyright owner that is granting the License.
18
+
19
+ "Legal Entity" shall mean the union of the acting entity and all
20
+ other entities that control, are controlled by, or are under common
21
+ control with that entity. For the purposes of this definition,
22
+ "control" means (i) the power, direct or indirect, to cause the
23
+ direction or management of such entity, whether by contract or
24
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
25
+ outstanding shares, or (iii) beneficial ownership of such entity.
26
+
27
+ "You" (or "Your") shall mean an individual or Legal Entity
28
+ exercising permissions granted by this License.
29
+
30
+ "Source" form shall mean the preferred form for making modifications,
31
+ including but not limited to software source code, documentation
32
+ source, and configuration files.
33
+
34
+ "Object" form shall mean any form resulting from mechanical
35
+ transformation or translation of a Source form, including but
36
+ not limited to compiled object code, generated documentation,
37
+ and conversions to other media types.
38
+
39
+ "Work" shall mean the work of authorship, whether in Source or
40
+ Object form, made available under the License, as indicated by a
41
+ copyright notice that is included in or attached to the work
42
+ (an example is provided in the Appendix below).
43
+
44
+ "Derivative Works" shall mean any work, whether in Source or Object
45
+ form, that is based on (or derived from) the Work and for which the
46
+ editorial revisions, annotations, elaborations, or other modifications
47
+ represent, as a whole, an original work of authorship. For the purposes
48
+ of this License, Derivative Works shall not include works that remain
49
+ separable from, or merely link (or bind by name) to the interfaces of,
50
+ the Work and Derivative Works thereof.
51
+
52
+ "Contribution" shall mean any work of authorship, including
53
+ the original version of the Work and any modifications or additions
54
+ to that Work or Derivative Works thereof, that is intentionally
55
+ submitted to Licensor for inclusion in the Work by the copyright owner
56
+ or by an individual or Legal Entity authorized to submit on behalf of
57
+ the copyright owner. For the purposes of this definition, "submitted"
58
+ means any form of electronic, verbal, or written communication sent
59
+ to the Licensor or its representatives, including but not limited to
60
+ communication on electronic mailing lists, source code control systems,
61
+ and issue tracking systems that are managed by, or on behalf of, the
62
+ Licensor for the purpose of discussing and improving the Work, but
63
+ excluding communication that is conspicuously marked or otherwise
64
+ designated in writing by the copyright owner as "Not a Contribution."
65
+
66
+ "Contributor" shall mean Licensor and any individual or Legal Entity
67
+ on behalf of whom a Contribution has been received by Licensor and
68
+ subsequently incorporated within the Work.
69
+
70
+ 2. Grant of Copyright License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ copyright license to reproduce, prepare Derivative Works of,
74
+ publicly display, publicly perform, sublicense, and distribute the
75
+ Work and such Derivative Works in Source or Object form.
76
+
77
+ 3. Grant of Patent License. Subject to the terms and conditions of
78
+ this License, each Contributor hereby grants to You a perpetual,
79
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
80
+ (except as stated in this section) patent license to make, have made,
81
+ use, offer to sell, sell, import, and otherwise transfer the Work,
82
+ where such license applies only to those patent claims licensable
83
+ by such Contributor that are necessarily infringed by their
84
+ Contribution(s) alone or by combination of their Contribution(s)
85
+ with the Work to which such Contribution(s) was submitted. If You
86
+ institute patent litigation against any entity (including a
87
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
88
+ or a Contribution incorporated within the Work constitutes direct
89
+ or contributory patent infringement, then any patent licenses
90
+ granted to You under this License for that Work shall terminate
91
+ as of the date such litigation is filed.
92
+
93
+ 4. Redistribution. You may reproduce and distribute copies of the
94
+ Work or Derivative Works thereof in any medium, with or without
95
+ modifications, and in Source or Object form, provided that You
96
+ meet the following conditions:
97
+
98
+ (a) You must give any other recipients of the Work or
99
+ Derivative Works a copy of this License; and
100
+
101
+ (b) You must cause any modified files to carry prominent notices
102
+ stating that You changed the files; and
103
+
104
+ (c) You must retain, in the Source form of any Derivative Works
105
+ that You distribute, all copyright, patent, trademark, and
106
+ attribution notices from the Source form of the Work,
107
+ excluding those notices that do not pertain to any part of
108
+ the Derivative Works; and
109
+
110
+ (d) If the Work includes a "NOTICE" text file as part of its
111
+ distribution, then any Derivative Works that You distribute must
112
+ include a readable copy of the attribution notices contained
113
+ within such NOTICE file, excluding those notices that do not
114
+ pertain to any part of the Derivative Works, in at least one
115
+ of the following places: within a NOTICE text file distributed
116
+ as part of the Derivative Works; within the Source form or
117
+ documentation, if provided along with the Derivative Works; or,
118
+ within a display generated by the Derivative Works, if and
119
+ wherever such third-party notices normally appear. The contents
120
+ of the NOTICE file are for informational purposes only and
121
+ do not modify the License. You may add Your own attribution
122
+ notices within Derivative Works that You distribute, alongside
123
+ or as an addendum to the NOTICE text from the Work, provided
124
+ that such additional attribution notices cannot be construed
125
+ as modifying the License.
126
+
127
+ You may add Your own copyright statement to Your modifications and
128
+ may provide additional or different license terms and conditions
129
+ for use, reproduction, or distribution of Your modifications, or
130
+ for any such Derivative Works as a whole, provided Your use,
131
+ reproduction, and distribution of the Work otherwise complies with
132
+ the conditions stated in this License.
133
+
134
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
135
+ any Contribution intentionally submitted for inclusion in the Work
136
+ by You to the Licensor shall be under the terms and conditions of
137
+ this License, without any additional terms or conditions.
138
+ Notwithstanding the above, nothing herein shall supersede or modify
139
+ the terms of any separate license agreement you may have executed
140
+ with Licensor regarding such Contributions.
141
+
142
+ 6. Trademarks. This License does not grant permission to use the trade
143
+ names, trademarks, service marks, or product names of the Licensor,
144
+ except as required for reasonable and customary use in describing the
145
+ origin of the Work and reproducing the content of the NOTICE file.
146
+
147
+ 7. Disclaimer of Warranty. Unless required by applicable law or
148
+ agreed to in writing, Licensor provides the Work (and each
149
+ Contributor provides its Contributions) on an "AS IS" BASIS,
150
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
151
+ implied, including, without limitation, any warranties or conditions
152
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
153
+ PARTICULAR PURPOSE. You are solely responsible for determining the
154
+ appropriateness of using or redistributing the Work and assume any
155
+ risks associated with Your exercise of permissions under this License.
156
+
157
+ 8. Limitation of Liability. In no event and under no legal theory,
158
+ whether in tort (including negligence), contract, or otherwise,
159
+ unless required by applicable law (such as deliberate and grossly
160
+ negligent acts) or agreed to in writing, shall any Contributor be
161
+ liable to You for damages, including any direct, indirect, special,
162
+ incidental, or consequential damages of any character arising as a
163
+ result of this License or out of the use or inability to use the
164
+ Work (including but not limited to damages for loss of goodwill,
165
+ work stoppage, computer failure or malfunction, or any and all
166
+ other commercial damages or losses), even if such Contributor
167
+ has been advised of the possibility of such damages.
168
+
169
+ 9. Accepting Warranty or Additional Liability. While redistributing
170
+ the Work or Derivative Works thereof, You may choose to offer,
171
+ and charge a fee for, acceptance of support, warranty, indemnity,
172
+ or other liability obligations and/or rights consistent with this
173
+ License. However, in accepting such obligations, You may act only
174
+ on Your own behalf and on Your sole responsibility, not on behalf
175
+ of any other Contributor, and only if You agree to indemnify,
176
+ defend, and hold each Contributor harmless for any liability
177
+ incurred by, or claims asserted against, such Contributor by reason
178
+ of your accepting any such warranty or additional liability.
179
+
180
+ END OF TERMS AND CONDITIONS
181
+
182
+ APPENDIX: How to apply the Apache License to your work.
183
+
184
+ To apply the Apache License to your work, attach the following
185
+ boilerplate notice, with the fields enclosed by brackets "[]"
186
+ replaced with your own identifying information. (Don't include
187
+ the brackets!) The text should be enclosed in the appropriate
188
+ comment syntax for the file format. We also recommend that a
189
+ file or class name and description of purpose be included on the
190
+ same "printed page" as the copyright notice for easier
191
+ identification within third-party archives.
192
+
193
+ Copyright 2022, European Union.
194
+
195
+ Licensed under the Apache License, Version 2.0 (the "License");
196
+ you may not use this file except in compliance with the License.
197
+ You may obtain a copy of the License at
198
+
199
+ http://www.apache.org/licenses/LICENSE-2.0
200
+
201
+ Unless required by applicable law or agreed to in writing, software
202
+ distributed under the License is distributed on an "AS IS" BASIS,
203
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204
+ See the License for the specific language governing permissions and
205
+ limitations under the License.
206
+
207
+ Project-URL: documentation, https://ecmwf.github.io/ecmwf-datastores-client/
208
+ Project-URL: source, https://github.com/ecmwf/ecmwf-datastores-client
209
+ Project-URL: tracker, https://github.com/ecmwf/ecmwf-datastores-client/issues
210
+ Classifier: Development Status :: 2 - Pre-Alpha
211
+ Classifier: Intended Audience :: Science/Research
212
+ Classifier: License :: OSI Approved :: Apache Software License
213
+ Classifier: Operating System :: OS Independent
214
+ Classifier: Programming Language :: Python
215
+ Classifier: Programming Language :: Python :: 3
216
+ Classifier: Programming Language :: Python :: 3.8
217
+ Classifier: Programming Language :: Python :: 3.9
218
+ Classifier: Programming Language :: Python :: 3.10
219
+ Classifier: Programming Language :: Python :: 3.11
220
+ Classifier: Programming Language :: Python :: 3.12
221
+ Classifier: Programming Language :: Python :: 3.13
222
+ Classifier: Topic :: Scientific/Engineering
223
+ Requires-Python: >=3.8
224
+ Description-Content-Type: text/markdown
225
+ License-File: LICENSE
226
+ Requires-Dist: attrs
227
+ Requires-Dist: multiurl>=0.3.2
228
+ Requires-Dist: requests
229
+ Requires-Dist: typing-extensions
230
+ Provides-Extra: legacy
231
+ Requires-Dist: cdsapi>=0.7.5; extra == "legacy"
232
+ Dynamic: license-file
233
+
234
+ <p align="center">
235
+ <a href="https://github.com/ecmwf/codex/raw/refs/heads/main/ESEE">
236
+ <img src="https://github.com/ecmwf/codex/raw/refs/heads/main/ESEE/data_provision_badge.svg" alt="ECMWF Software EnginE">
237
+ </a>
238
+ <a href="https://github.com/ecmwf/codex/raw/refs/heads/main/Project Maturity">
239
+ <img src="https://github.com/ecmwf/codex/raw/refs/heads/main/Project Maturity/incubating_badge.svg" alt="Maturity Level">
240
+ </a>
241
+ <!-- <a href="https://codecov.io/gh/ecmwf/earthkit">
242
+ <img src="https://codecov.io/gh/ecmwf/ecmwf-datastores-client/branch/main/graph/badge.svg" alt="Code Coverage">
243
+ </a> -->
244
+ <a href="https://opensource.org/licenses/apache-2-0">
245
+ <img src="https://img.shields.io/badge/Licence-Apache 2.0-blue.svg" alt="Licence">
246
+ </a>
247
+ <a href="https://github.com/ecmwf/earthkit/releases">
248
+ <img src="https://img.shields.io/github/v/release/ecmwf/ecmwf-datastores-client?color=purple&label=Release" alt="Latest Release">
249
+ </a>
250
+ </p>
251
+
252
+ <p align="center">
253
+ <a href="#quick-start">Quick Start</a>
254
+
255
+ <a href="#installation">Installation</a>
256
+
257
+ <a href="https://ecmwf.github.io/ecmwf-datastores-client/">Documentation</a>
258
+ </p>
259
+
260
+ > [!IMPORTANT]
261
+ > This software is **Incubating** and subject to ECMWF's guidelines on [Software Maturity](https://github.com/ecmwf/codex/raw/refs/heads/main/Project%20Maturity).
262
+
263
+ # ecmwf-datastores-client
264
+
265
+ ECMWF Data Stores Service (DSS) API Python client.
266
+
267
+ Technical documentation: https://ecmwf.github.io/ecmwf-datastores-client/
268
+
269
+ ## Installation
270
+
271
+ Install with conda:
272
+
273
+ ```
274
+ $ conda install -c conda-forge ecmwf-datastores-client
275
+ ```
276
+
277
+ Install with pip:
278
+
279
+ ```
280
+ $ pip install ecmwf-datastores-client
281
+ ```
282
+
283
+ ## Configuration
284
+
285
+ The `Client` requires the `url` to the API root and a valid API `key`. You can also set the `ECMWF_DATASTORES_URL` and `ECMWF_DATASTORES_KEY` environment variables, or use a configuration file.
286
+ The configuration file must be located at `~/.ecmwfdatastoresrc`, or at the path specified by the `ECMWF_DATASTORES_RC_FILE` environment variable.
287
+
288
+ ```
289
+ $ cat $HOME/.ecmwfdatastoresrc
290
+ url: https://cds.climate.copernicus.eu/api
291
+ key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
292
+ ```
293
+
294
+ It is possible (though not recommended) to use the API key of one of the test users:
295
+
296
+ ```
297
+ 00112233-4455-6677-c899-aabbccddeeff
298
+ ```
299
+
300
+ This key is used for anonymous tests and is designed to be the least performant option for accessing the system.
301
+
302
+ ## Quick Start
303
+
304
+ Configure the logging level to display INFO messages:
305
+
306
+ ```python
307
+ >>> import logging
308
+ >>> logging.basicConfig(level="INFO")
309
+
310
+ ```
311
+
312
+ Instantiate the API client and optionally verify authentication:
313
+
314
+ ```python
315
+ >>> import os
316
+ >>> from ecmwf.datastores import Client
317
+ >>> client = Client(
318
+ ... url=os.getenv("ECMWF_DATASTORES_URL"),
319
+ ... key=os.getenv("ECMWF_DATASTORES_KEY"),
320
+ ... )
321
+ >>> client.check_authentication() # optional check
322
+ {...}
323
+
324
+ ```
325
+
326
+ Retrieve data:
327
+
328
+ ```python
329
+ >>> collection_id = "reanalysis-era5-pressure-levels"
330
+ >>> request = {
331
+ ... "product_type": ["reanalysis"],
332
+ ... "variable": ["temperature"],
333
+ ... "year": ["2022"],
334
+ ... "month": ["01"],
335
+ ... "day": ["01"],
336
+ ... "time": ["00:00"],
337
+ ... "pressure_level": ["1000"],
338
+ ... "data_format": "grib",
339
+ ... "download_format": "unarchived"
340
+ ... }
341
+
342
+ >>> client.retrieve(collection_id, request, target="target_1.grib") # blocks
343
+ 'target_1.grib'
344
+
345
+ ```
346
+
347
+ Alternative methods to retrieve data:
348
+
349
+ ```python
350
+ >>> remote = client.submit(collection_id, request) # doesn't block
351
+ >>> remote
352
+ Remote(...)
353
+ >>> remote.download("target_2.grib") # blocks
354
+ 'target_2.grib'
355
+
356
+ >>> results = client.submit_and_wait_on_results(collection_id, request) # blocks
357
+ >>> results
358
+ Results(...)
359
+ >>> results.download("target_3.grib")
360
+ 'target_3.grib'
361
+
362
+ >>> client.download_results(remote.request_id, "target_4.grib") # blocks
363
+ 'target_4.grib'
364
+
365
+ ```
366
+
367
+ List all collection IDs sorted by last update:
368
+
369
+ ```python
370
+ >>> collections = client.get_collections(sortby="update")
371
+
372
+ >>> collection_ids = []
373
+ >>> while collections is not None: # Loop over pages
374
+ ... collection_ids.extend(collections.collection_ids)
375
+ ... collections = collections.next # Move to the next page
376
+
377
+ >>> collection_ids
378
+ [...]
379
+ >>> collection_id in collection_ids
380
+ True
381
+
382
+ ```
383
+
384
+ Explore a collection:
385
+
386
+ ```python
387
+ >>> collection = client.get_collection(collection_id)
388
+
389
+ >>> collection.id == collection_id
390
+ True
391
+ >>> collection.title
392
+ '...'
393
+ >>> collection.description
394
+ '...'
395
+
396
+ >>> collection.published_at
397
+ datetime.datetime(...)
398
+ >>> collection.updated_at
399
+ datetime.datetime(...)
400
+
401
+ >>> collection.begin_datetime
402
+ datetime.datetime(...)
403
+ >>> collection.end_datetime
404
+ datetime.datetime(...)
405
+ >>> collection.bbox
406
+ (...)
407
+
408
+ >>> collection.submit(request)
409
+ Remote(...)
410
+
411
+ >>> collection.apply_constraints(request)
412
+ {...}
413
+
414
+ ```
415
+
416
+ Interact with results:
417
+
418
+ ```python
419
+ >>> results = client.get_results(remote.request_id)
420
+
421
+ >>> results.content_length > 0
422
+ True
423
+ >>> results.content_type
424
+ 'application/x-grib'
425
+ >>> results.location
426
+ '...'
427
+
428
+ >>> results.download("target_5.grib")
429
+ 'target_5.grib'
430
+
431
+ ```
432
+
433
+ List all successful jobs, sorted by newest first:
434
+
435
+ ```python
436
+ >>> jobs = client.get_jobs(sortby="-created", status="successful")
437
+
438
+ >>> request_ids = []
439
+ >>> while jobs is not None: # Loop over pages
440
+ ... request_ids.extend(jobs.request_ids)
441
+ ... jobs = jobs.next # Move to the next page
442
+
443
+ >>> request_ids
444
+ [...]
445
+ >>> remote.request_id in request_ids
446
+ True
447
+
448
+ ```
449
+
450
+ Interact with a previously submitted job:
451
+
452
+ ```python
453
+ >>> remote = client.get_remote(remote.request_id)
454
+
455
+ >>> remote.collection_id == collection_id
456
+ True
457
+ >>> remote.request == request
458
+ True
459
+
460
+ >>> remote.status
461
+ 'successful'
462
+ >>> remote.results_ready
463
+ True
464
+
465
+ >>> remote.created_at
466
+ datetime.datetime(...)
467
+ >>> remote.started_at
468
+ datetime.datetime(...)
469
+ >>> remote.finished_at
470
+ datetime.datetime(...)
471
+ >>> remote.updated_at == remote.finished_at
472
+ True
473
+
474
+ >>> remote.download("target_6.grib")
475
+ 'target_6.grib'
476
+
477
+ >>> remote.get_results()
478
+ Results(...)
479
+
480
+ >>> remote.delete()
481
+ {...}
482
+
483
+ ```
484
+
485
+ Apply constraints and find the number of available days in a given month:
486
+
487
+ ```python
488
+ >>> month = {"year": "2000", "month": "02"}
489
+ >>> constrained_request = client.apply_constraints(collection_id, month)
490
+
491
+ >>> len(constrained_request["day"])
492
+ 29
493
+
494
+ ```
495
+
496
+ ## Workflow for developers/contributors
497
+
498
+ For best experience create a new conda environment (e.g. DEVELOP) with Python 3.11:
499
+
500
+ ```
501
+ conda create -n DEVELOP -c conda-forge python=3.11
502
+ conda activate DEVELOP
503
+ ```
504
+
505
+ Before pushing to GitHub, run the following commands:
506
+
507
+ 1. Update conda environment: `make conda-env-update`
508
+ 1. Install this package: `pip install -e .`
509
+ 1. Sync with the latest [template](https://github.com/ecmwf-projects/cookiecutter-conda-package) (optional): `make template-update`
510
+ 1. Run quality assurance checks: `make qa`
511
+ 1. Run tests: `make unit-tests`
512
+ 1. Run the static type checker: `make type-check`
513
+ 1. Build the documentation (see [Sphinx tutorial](https://www.sphinx-doc.org/en/master/tutorial/)): `make docs-build`
514
+
515
+ ## License
516
+
517
+ ```
518
+ Copyright 2022, European Union.
519
+
520
+ Licensed under the Apache License, Version 2.0 (the "License");
521
+ you may not use this file except in compliance with the License.
522
+ You may obtain a copy of the License at
523
+
524
+ http://www.apache.org/licenses/LICENSE-2.0
525
+
526
+ Unless required by applicable law or agreed to in writing, software
527
+ distributed under the License is distributed on an "AS IS" BASIS,
528
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
529
+ See the License for the specific language governing permissions and
530
+ limitations under the License.
531
+ ```
@@ -0,0 +1,15 @@
1
+ ecmwf/datastores/__init__.py,sha256=RQ5WNfEjLQ1qlZxyvGv3S6zPcFO35UcgN4iiz_Uh06I,1243
2
+ ecmwf/datastores/catalogue.py,sha256=Mj5myLRkk_NcjWSZISuZxU-jJIhSAATFhsJJveiyiHo,6609
3
+ ecmwf/datastores/client.py,sha256=0hRAHOV-i5Cbu6z_VL7nyMzx_qjCAtxVzhuxexiciGI,12646
4
+ ecmwf/datastores/config.py,sha256=45C4nvgk-uGucCAnN3bUtr_zv-_dm8IN_P5xl7LPqfs,1497
5
+ ecmwf/datastores/legacy_client.py,sha256=UEkQNg9IA_zNnpZrc4I9O2X2h39NsaxYM0xpL2OKghA,9491
6
+ ecmwf/datastores/processing.py,sha256=FrDBoO8HfQ_dlqo15xe_SK_AHiPBQ9fvJ5UYbaeLxsE,24095
7
+ ecmwf/datastores/profile.py,sha256=VjT6GSoSZZyaDHXZh0SQbrzxSX3Ug2DOWhq7VIu-QX8,2974
8
+ ecmwf/datastores/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ ecmwf/datastores/utils.py,sha256=fc6wma5qRpgAsX3dOmg0aoIc-qjWG6NY9PSHaWR8CpE,320
10
+ ecmwf/datastores/version.py,sha256=FGsmFbZ942cZk42U_qHqxgRCbsD--5Vld_eR6xKJ-mQ,72
11
+ ecmwf_datastores_client-0.1.0.dist-info/licenses/LICENSE,sha256=e2Qp4JUZeHZZSYCADyp1B3siZB5aQE5MRCYRx7vqlNI,11346
12
+ ecmwf_datastores_client-0.1.0.dist-info/METADATA,sha256=iWh4WP7qUyNI2kxFJJmj9kxo9a-c_rwIQkhE3o2NiEA,21715
13
+ ecmwf_datastores_client-0.1.0.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
14
+ ecmwf_datastores_client-0.1.0.dist-info/top_level.txt,sha256=gvA9-Z3hRaFzijz-mf8v2t84s25ptpWeqhyuUomJoJk,6
15
+ ecmwf_datastores_client-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.3.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+