Runs a SQL command on SAP HANA Cloud using OAuth single sign on and returns a pandas or polars dataframe
Project description
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
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:
hci.config_file = 'location of configuration file'
the configuration file is a .json file
{
"CLIENT_ID": "",
"CLIENT_SECRET": "",
"AUTH_URL": "",
"TOKEN_URL": "",
"protected_url": "",
"REDIRECT_URI": "",
"SCOPE": "",
"HC_prod_URL": ""
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hana_cloud_interface-0.1.5.tar.gz.
File metadata
- Download URL: hana_cloud_interface-0.1.5.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
775e3bb806d994e2c197ea20aad04109963378ff60dd7ef30ba457160e5c196c
|
|
| MD5 |
17438723f1c5b0dedbc02c7a8da19a7b
|
|
| BLAKE2b-256 |
bc04ac3886eeedb914e45973593fb01baab381315fd3e43270d3eaec0c31feae
|
File details
Details for the file hana_cloud_interface-0.1.5-py3-none-any.whl.
File metadata
- Download URL: hana_cloud_interface-0.1.5-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45537a7715a7126a00d84988a2f4465274934d6d4d48f32475705fea8552adae
|
|
| MD5 |
0ed2bfae5125e0dc913cb75d781e48f4
|
|
| BLAKE2b-256 |
e609341bba39ef010eb9d149f20407cfd70301bab9cedd725f07d422433ac55c
|