Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 06191f9

Browse files
committed
cleanup README
1 parent bb68beb commit 06191f9

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

README.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,30 @@ Draft Python API:
1616
>>> client = cads_api_client.ApiClient()
1717
>>> assert client.check_authentication()
1818

19-
>>> collection = client.get_collection("reanalysis-era5-pressure-levels")
19+
>>> collection_id = "reanalysis-era5-pressure-levels"
20+
>>> collection = client.get_collection(collection_id)
2021
>>> collection.end_datetime
2122
datetime.datetime(...)
2223

24+
>>> request = {
25+
... "product_type": "reanalysis",
26+
... "variable": "temperature",
27+
... "year": "2022",
28+
... "month": "01",
29+
... "day": "01",
30+
... "level": "1000",
31+
... "time": "00:00",
32+
... }
2333
>>> client.retrieve(
2434
... collection_id="reanalysis-era5-pressure-levels",
25-
... product_type="reanalysis",
26-
... variable="temperature",
27-
... year="2022",
28-
... month="01",
29-
... day="01",
30-
... level="1000",
31-
... time="00:00",
35+
... **request,
3236
... target="tmp1-era5.grib",
3337
... ) # blocks
3438
'tmp1-era5.grib'
3539

3640
>>> remote = client.submit(
3741
... collection_id="reanalysis-era5-pressure-levels",
38-
... variable="temperature",
39-
... product_type="reanalysis",
40-
... year="2021",
41-
... month="01",
42-
... day="02",
43-
... time="00:00",
44-
... level="1000",
42+
... **request,
4543
... ) # doesn't block
4644
>>> remote.request_uid
4745
'...'

0 commit comments

Comments
 (0)