Python package for request and download data from CCSI
Project description
ptr-metagen
Description
Python package for request and download data from CCSI
Install
pip install pyccsi
Usage
Import of the downloader class
from pyccsi import CCSIDownloader
Initialization of the downloader class. Class expecting only one parameter that is the base/host url of CCSI server instance
ccsi = CCSIDownloader(host_url="http://localhost:5000")
Downloader method 'send_request' send the request on the CSSI resource endpoin vis. host_url/:resource/...
Available resources name can be get via get request on the resource parameters endpoint vis. host_url/resources/parameters
Parameter params is a dict of resource parameters in the form of dictionary od pydantic base model. Parameters of given resource endpoint are show on resource OpenSearch description dokument vis. host_url/:resource/atom/search/description.xml
ccsi.send_request(resource=resource, params=params)
Send request can return list of the record requested from the CCSI for aditional sorting and manipulation
####Example of params dictionary resource: cds_er5
{
'timeStart': '2021-01-01',
'timeEnd': '2021-01-10',
'bbox': '25.067713534286536,35.298035029324204,25.193195594830012,35.347934920842974',
'custom:camsDataset': 'total_column_water_vapour,10m_u_component_of_wind',
'custom:hour': '03:00,06:00',
'custom:format': 'grib'
}
Second downloader method download accept the path of the folder where the data will be downloaded.
ccsi.download(path=output_directory)
Optionaly custom list of the records can be set in the method
ccsi.download(path=output_directory, records=records)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyccsi-1.0.1.tar.gz
.
File metadata
- Download URL: pyccsi-1.0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a84c2a0b4f05a834274f3b0616143729f5b33f39baec176fe5eeb1b33441fc6 |
|
MD5 | ffade38eecc7b941a60fcd6a6fbf3a1d |
|
BLAKE2b-256 | b24cbca51cb16226989965dc1e25e1383d1275927ad9ea580eb01af6bc37ed51 |
File details
Details for the file pyccsi-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: pyccsi-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98db93b6c11d96ec6148540762f1dad5b181330ccb75213da73cc3c727aab323 |
|
MD5 | 8585b6de1909afdd8bda2effe1bc3358 |
|
BLAKE2b-256 | 63d4cbfd01acc90148e334b6058b5b856a31bc2ea7af2d2245a339f2ca796285 |