Alfredo Oliviero 062187ef9f | ||
---|---|---|
d4science_copernicus_cds | ||
.gitignore | ||
CHANGELOG.md | ||
FUNDING.md | ||
LICENSE.md | ||
README.md | ||
setup.py |
README.md
d4science_copernicus_cds
d4science_copernicus_cds is a library developed by CNR-ISTI to manage Climate Data Store (CDS) API authentication within D4Science JupyterLab environments. It simplifies credential handling, allowing for secure, reusable access to the CDS API across multiple notebooks.
Version
v.1.0.0
Installation
Python: Install the library directly from the D4Science Git
pip install git+https://code-repo.d4science.org/D4Science/d4science_copernicus_cds.git
Jupyter notebook: install using the !
prefix
! pip install git+https://code-repo.d4science.org/D4Science/d4science_copernicus_cds.git
Built With
- Copernicus CDSAPI - the Copernicus Climate Data Store (CDS) Application Program Interface (API) client
- python
- d4science
Documentation
- Centralized Authentication: Configures the JupyterLab environment for automatic CDS authentication without the need to specify credentials in each notebook.
- Secure Credential Storage: Optionally saves credentials in a hidden configuration file, enabling silent authentication in future sessions.
- Flexible Credential Management: Provides functions to add, view, and remove credentials from the environment and configuration files.
Usage
Below are the main commands provided by the auth_cds library to manage CDS API authentication and configuration.
First, import the necessary functions:
from auth_cds import cds_authenticate, cds_remove_conf, cds_save_conf, cds_remove_env, cds_show_conf
Main Commands
Authenticate and get CDS client: This command authenticates and returns a CDS API client instance.
client = cds_authenticate()
Save the current or new configuration: Saves the configuration to a default hidden file.
cds_save_conf()
Remove environment variables for the CDS API: Clears the CDS API credentials from environment variables. To execute, remove the comment symbol (#).
cds_remove_env()
Remove configurations from default paths: Removes any saved configuration files. To execute, remove the comment symbol (#).
cds_remove_conf()
Show current configuration from environment and files: Displays the credentials configured in the environment and any found in the saved configuration file.
cds_show_conf()
Change log
See CHANGELOG.md.
Authors
- Alfredo Oliviero (ORCID) - ISTI-CNR Infrascience Group
Maintainers
- Alfredo Oliviero (ORCID) - ISTI-CNR Infrascience Group
License
This project is licensed under the EUPL V.1.1 License - see the LICENSE.md file for details.
About the gCube Framework
This software is part of the gCubeFramework: an open-source software toolkit used for building and operating Hybrid Data Infrastructures enabling the dynamic deployment of Virtual Research Environments by favouring the realisation of reuse oriented policies.
The projects leading to this software have received funding from a series of European Union programmes see FUNDING.md