readme & co

This commit is contained in:
Alfredo Oliviero 2024-11-03 10:03:20 +01:00
parent 29a8aa136d
commit a66b5a7af0
3 changed files with 46 additions and 36 deletions

View File

@ -1,5 +1,5 @@
# Changelog for "d4science_auth_cds"
## [1.0.0]
## [v1.0.0]
- first release

View File

@ -3,24 +3,26 @@
The projects leading to this software have received funding from a series of European Union programmes including:
- the Sixth Framework Programme for Research and Technological Development
- [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260).
- [DILIGENT](https://cordis.europa.eu/project/id/004260) (grant no. 004260)
- the Seventh Framework Programme for research, technological development and demonstration
- [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488);
- [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019);
- [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465);
- [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644);
- [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754).
- [D4Science](https://cordis.europa.eu/project/id/212488) (grant no. 212488)
- [D4Science-II](https://cordis.europa.eu/project/id/239019) (grant no.239019)
- [ENVRI](https://cordis.europa.eu/project/id/283465) (grant no. 283465)
- [iMarine](https://cordis.europa.eu/project/id/283644) (grant no. 283644)
- [EUBrazilOpenBio](https://cordis.europa.eu/project/id/288754) (grant no. 288754)
- the H2020 research and innovation programme
- [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024);
- [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119);
- [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142);
- [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182);
- [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680);
- [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610);
- [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001);
- [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194);
- [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914);
- [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091);
- [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650);
- [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409);
- [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042);
- [SoBigData](https://cordis.europa.eu/project/id/654024) (grant no. 654024)
- [PARTHENOS](https://cordis.europa.eu/project/id/654119) (grant no. 654119)
- [EGI-Engage](https://cordis.europa.eu/project/id/654142) (grant no. 654142)
- [ENVRI PLUS](https://cordis.europa.eu/project/id/654182) (grant no. 654182)
- [BlueBRIDGE](https://cordis.europa.eu/project/id/675680) (grant no. 675680)
- [PerformFISH](https://cordis.europa.eu/project/id/727610) (grant no. 727610)
- [AGINFRA PLUS](https://cordis.europa.eu/project/id/731001) (grant no. 731001)
- [DESIRA](https://cordis.europa.eu/project/id/818194) (grant no. 818194)
- [ARIADNEplus](https://cordis.europa.eu/project/id/823914) (grant no. 823914)
- [RISIS 2](https://cordis.europa.eu/project/id/824091) (grant no. 824091)
- [EOSC-Pillar](https://cordis.europa.eu/project/id/857650) (grant no. 857650)
- [Blue Cloud](https://cordis.europa.eu/project/id/862409) (grant no. 862409)
- [SoBigData-PlusPlus](https://cordis.europa.eu/project/id/871042) (grant no. 871042)

View File

@ -8,25 +8,33 @@ v.1.0.0
## Installation
Install the library directly from the D4Science Git
Python: Install the library directly from the D4Science Git
```
```sh
pip install git+https://code-repo.d4science.org/D4Science/d4science_copernicus_cds.git
```
Jupyter notebook: install using the `!` prefix
```sh
! pip install git+https://code-repo.d4science.org/D4Science/d4science_copernicus_cds.git
```
## Built With
* [Copernicus CDSAPI](https://cds.climate.copernicus.eu/how-to-api/) - the Copernicus Climate Data Store (CDS) Application Program Interface (API) client
* [python](https://python.org/ecli)
* [python](https://python.org/)
* [d4science](https://www.d4science.org/)
## 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.
* **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
Usage
Below are the main commands provided by the auth_cds library to manage CDS API authentication and configuration.
First, import the necessary functions:
@ -35,43 +43,43 @@ 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:
#### Main Commands
**Authenticate and get CDS client:**
This command authenticates and returns a CDS API client instance.
```python
client = cds_authenticate()
```
Save the current or new configuration:
**Save the current or new configuration:**
Saves the configuration to a default hidden file.
```python
cds_save_conf()
```
Remove environment variables for the CDS API:
**Remove environment variables for the CDS API:**
Clears the CDS API credentials from environment variables. To execute, remove the comment symbol (#).
```python
cds_remove_env()
```
Remove configurations from default paths:
**Remove configurations from default paths:**
Removes any saved configuration files. To execute, remove the comment symbol (#).
```python
cds_remove_conf()
```
Show current configuration from environment and files:
**Show current configuration from environment and files:**
Displays the credentials configured in the environment and any found in the saved configuration file.
```python
cds_show_conf()
```
## Change log
See [CHANGELOG.md](CHANGELOG.md).