cloudnet-api-client 0.8.0__tar.gz → 0.9.0__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.
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/CHANGELOG.md +4 -0
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/PKG-INFO +18 -12
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/README.md +17 -11
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/cloudnet_api_client/client.py +2 -2
- cloudnet_api_client-0.9.0/cloudnet_api_client/version.py +1 -0
- cloudnet_api_client-0.8.0/cloudnet_api_client/version.py +0 -1
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/.github/workflows/publish.yml +0 -0
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/.github/workflows/test.yml +0 -0
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/.gitignore +0 -0
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/.pre-commit-config.yaml +0 -0
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/LICENSE +0 -0
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/cloudnet_api_client/__init__.py +0 -0
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/cloudnet_api_client/containers.py +0 -0
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/cloudnet_api_client/dl.py +0 -0
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/cloudnet_api_client/py.typed +0 -0
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/cloudnet_api_client/utils.py +0 -0
- {cloudnet_api_client-0.8.0 → cloudnet_api_client-0.9.0}/pyproject.toml +0 -0
|
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## 0.9.0 – 2025-05-14
|
|
9
|
+
|
|
10
|
+
- By default download to current folder
|
|
11
|
+
|
|
8
12
|
## 0.8.0 – 2025-05-14
|
|
9
13
|
|
|
10
14
|
- Add site to metadata responses
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudnet-api-client
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: Cloudnet API client
|
|
5
5
|
Author-email: Simo Tukiainen <simo.tukiainen@fmi.fi>
|
|
6
6
|
License-File: LICENSE
|
|
@@ -48,11 +48,17 @@ client = APIClient()
|
|
|
48
48
|
sites = client.sites(type="cloudnet")
|
|
49
49
|
products = client.products()
|
|
50
50
|
|
|
51
|
-
metadata = client.metadata("hyytiala", "2021-01-01", product=["mwr", "radar"])
|
|
52
|
-
client.download(metadata, "data/")
|
|
51
|
+
metadata = client.metadata(site_id="hyytiala", date="2021-01-01", product=["mwr", "radar"])
|
|
52
|
+
file_paths = client.download(metadata, "data/")
|
|
53
53
|
|
|
54
|
-
raw_metadata = client.raw_metadata("granada", date="2024-01", instrument_id="parsivel")
|
|
55
|
-
client.download(raw_metadata, "data_raw/")
|
|
54
|
+
raw_metadata = client.raw_metadata(site_id="granada", date="2024-01", instrument_id="parsivel")
|
|
55
|
+
file_paths = client.download(raw_metadata, "data_raw/")
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
When downloading files inside Jupyter notebook (or similar environment), you have to use the asynchronous version:
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
file_paths = await client.adownload(metadata)
|
|
56
62
|
```
|
|
57
63
|
|
|
58
64
|
## Documentation
|
|
@@ -152,13 +158,13 @@ Download files from the fetched metadata.
|
|
|
152
158
|
|
|
153
159
|
Parameters:
|
|
154
160
|
|
|
155
|
-
| name | type | default
|
|
156
|
-
| ----------------- | ---------------------------------------------- |
|
|
157
|
-
| metadata | `list[RawMetadata]` or `list[ProductMetadata]` |
|
|
158
|
-
| output_directory | `PathLike` or `str` |
|
|
159
|
-
| concurrency_limit | `int` | 5
|
|
160
|
-
| progress | `bool` or `None` | `None`
|
|
161
|
-
| validate_checksum | `bool` | `False`
|
|
161
|
+
| name | type | default |
|
|
162
|
+
| ----------------- | ---------------------------------------------- | ----------------- |
|
|
163
|
+
| metadata | `list[RawMetadata]` or `list[ProductMetadata]` | |
|
|
164
|
+
| output_directory | `PathLike` or `str` | Current directory |
|
|
165
|
+
| concurrency_limit | `int` | 5 |
|
|
166
|
+
| progress | `bool` or `None` | `None` |
|
|
167
|
+
| validate_checksum | `bool` | `False` |
|
|
162
168
|
|
|
163
169
|
There's also an asynchronous version of this function:
|
|
164
170
|
`cloudnet_api_client.adownload`. It's useful for usage inside Jupyter notebook.
|
|
@@ -21,11 +21,17 @@ client = APIClient()
|
|
|
21
21
|
sites = client.sites(type="cloudnet")
|
|
22
22
|
products = client.products()
|
|
23
23
|
|
|
24
|
-
metadata = client.metadata("hyytiala", "2021-01-01", product=["mwr", "radar"])
|
|
25
|
-
client.download(metadata, "data/")
|
|
24
|
+
metadata = client.metadata(site_id="hyytiala", date="2021-01-01", product=["mwr", "radar"])
|
|
25
|
+
file_paths = client.download(metadata, "data/")
|
|
26
26
|
|
|
27
|
-
raw_metadata = client.raw_metadata("granada", date="2024-01", instrument_id="parsivel")
|
|
28
|
-
client.download(raw_metadata, "data_raw/")
|
|
27
|
+
raw_metadata = client.raw_metadata(site_id="granada", date="2024-01", instrument_id="parsivel")
|
|
28
|
+
file_paths = client.download(raw_metadata, "data_raw/")
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
When downloading files inside Jupyter notebook (or similar environment), you have to use the asynchronous version:
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
file_paths = await client.adownload(metadata)
|
|
29
35
|
```
|
|
30
36
|
|
|
31
37
|
## Documentation
|
|
@@ -125,13 +131,13 @@ Download files from the fetched metadata.
|
|
|
125
131
|
|
|
126
132
|
Parameters:
|
|
127
133
|
|
|
128
|
-
| name | type | default
|
|
129
|
-
| ----------------- | ---------------------------------------------- |
|
|
130
|
-
| metadata | `list[RawMetadata]` or `list[ProductMetadata]` |
|
|
131
|
-
| output_directory | `PathLike` or `str` |
|
|
132
|
-
| concurrency_limit | `int` | 5
|
|
133
|
-
| progress | `bool` or `None` | `None`
|
|
134
|
-
| validate_checksum | `bool` | `False`
|
|
134
|
+
| name | type | default |
|
|
135
|
+
| ----------------- | ---------------------------------------------- | ----------------- |
|
|
136
|
+
| metadata | `list[RawMetadata]` or `list[ProductMetadata]` | |
|
|
137
|
+
| output_directory | `PathLike` or `str` | Current directory |
|
|
138
|
+
| concurrency_limit | `int` | 5 |
|
|
139
|
+
| progress | `bool` or `None` | `None` |
|
|
140
|
+
| validate_checksum | `bool` | `False` |
|
|
135
141
|
|
|
136
142
|
There's also an asynchronous version of this function:
|
|
137
143
|
`cloudnet_api_client.adownload`. It's useful for usage inside Jupyter notebook.
|
|
@@ -193,7 +193,7 @@ class APIClient:
|
|
|
193
193
|
def download(
|
|
194
194
|
self,
|
|
195
195
|
metadata: MetadataList,
|
|
196
|
-
output_directory: str | PathLike,
|
|
196
|
+
output_directory: str | PathLike = ".",
|
|
197
197
|
concurrency_limit: int = 5,
|
|
198
198
|
progress: bool | None = None,
|
|
199
199
|
validate_checksum: bool = False,
|
|
@@ -211,7 +211,7 @@ class APIClient:
|
|
|
211
211
|
async def adownload(
|
|
212
212
|
self,
|
|
213
213
|
metadata: MetadataList,
|
|
214
|
-
output_directory: str | PathLike,
|
|
214
|
+
output_directory: str | PathLike = ".",
|
|
215
215
|
concurrency_limit: int = 5,
|
|
216
216
|
progress: bool | None = None,
|
|
217
217
|
validate_checksum: bool = False,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.8.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|