A D4Science library to manage Climate Data Store (CDS) API authentication within JupyterLab environments. This tool simplifies credential management and supports secure, automatic access to the CDS API across notebooks.
Go to file
Alfredo Oliviero a66b5a7af0 readme & co 2024-11-03 10:03:20 +01:00
d4science_auth_cds lib 2024-10-31 17:45:55 +01:00
.gitignore gitignore 2024-10-31 17:37:29 +01:00
CHANGELOG.md readme & co 2024-11-03 10:03:20 +01:00
FUNDING.md readme & co 2024-11-03 10:03:20 +01:00
LICENSE.md readme & co 2024-10-31 17:45:28 +01:00
README.md readme & co 2024-11-03 10:03:20 +01:00
auth_cds.ipynb lib 2024-10-31 17:45:55 +01:00
reanalysis-climatology.ipynb updated version 2024-10-18 16:31:00 +02:00
setup.py fix setup 2024-11-03 09:50:34 +01:00

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

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

Maintainers

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