fix setup

This commit is contained in:
Alfredo Oliviero 2024-11-03 09:50:34 +01:00
parent d309a0d677
commit 29a8aa136d
2 changed files with 26 additions and 16 deletions

View File

@ -1,13 +1,17 @@
# d4science_auth_cds
# d4science_copernicus_cds
**d4science_auth_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.
**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
Install the library directly from the D4Science Git
```
pip install git+https://code-repo.d4science.org/D4Science/d4science_auth_cds.git
pip install git+https://code-repo.d4science.org/D4Science/d4science_copernicus_cds.git
```
## Built With
@ -27,25 +31,24 @@ Below are the main commands provided by the auth_cds library to manage CDS API a
First, import the necessary functions:
```python from auth_cds import cds_authenticate, cds_remove_conf, cds_save_conf, cds_remove_env, cds_show_conf ```
```python
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.
```python client = cds_authenticate() ```
Remove configurations from default paths:
Removes any saved configuration files. To execute, remove the comment symbol (#).
```python
cds_remove_conf()
client = cds_authenticate()
```
Save the current or new configuration:
Saves the configuration to a default hidden file.
```python cds_save_conf() ```
```python
cds_save_conf()
```
Remove environment variables for the CDS API:
Clears the CDS API credentials from environment variables. To execute, remove the comment symbol (#).
@ -54,12 +57,19 @@ Clears the CDS API credentials from environment variables. To execute, remove th
cds_remove_env()
```
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:
Displays the credentials configured in the environment and any found in the saved configuration file.
```python cds_show_conf() ```
```python
cds_show_conf()
```
## Change log

View File

@ -1,14 +1,14 @@
from setuptools import setup, find_packages
setup(
name="d4science_auth_cds",
name="d4science_copernicus_cds",
version="1.0.0",
description="A D4Science library for managing CDS API authentication in JupyterLab",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
author="Alfredo Oliviero",
author_email="alfredo.oliviero@isti.cnr.it",
url="https://code-repo.d4science.org/D4Science/d4science_auth_cds.git",
url="https://code-repo.d4science.org/D4Science/d4science_copernicus_cds.git",
packages=find_packages(),
install_requires=[
"cdsapi>=0.7.2",