Metadata-Version: 2.3
Name: hana-cloud-interface
Version: 0.1.5
Summary: Runs a SQL command on SAP HANA Cloud using OAuth single sign on and returns a pandas or polars dataframe
Author: charlotte corpe
Author-email: charlotte corpe <charlotte.corpe@powerco.co.nz>
Requires-Dist: keyring
Requires-Dist: hdbcli
Requires-Dist: polars
Requires-Dist: pandas
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# Usage of the `hana_cloud_interface` package 

This package provides a simple interface to connect to SAP HANA Cloud databases and execute SQL queries. Below are some examples of how to use the package.


## example
the main function is very simple It takes a SQL command as a string and returns the data
```python
import hana_cloud_interface as hci

sql_command = """
SELECT top 10
    "data1"
    "data2"
FROM "table1"
"""
    
data = hci.hana_sql(sql_command)

```

## Configuration file
You need specify the location of your configuration file by setting the `config_file` attribute of the `hci` module. For example:

```python
hci.config_file = 'location of configuration file'
```
the configuration file is a .json file
```python
{
    "CLIENT_ID": "",
    "CLIENT_SECRET": "",
    "AUTH_URL": "",
    "TOKEN_URL": "",
    "protected_url": "",
    "REDIRECT_URI": "",
    "SCOPE": "",
	"HC_prod_URL": ""
}
```