Skip to main content

A Python library that simplifies Keboola SAPI integration in Streamlit apps.

Project description

KeboolaStreamlit

Keboola Streamlit simplifies the use of Keboola Storage API within Streamlit apps, providing easy-to-use functions for authentication, data retrieval, event logging, and data loading.

Installation

To install KeboolaStreamlit, you can use pip:

pip install keboola-streamlit

Usage

Initialization

Create an instance of the KeboolaStreamlit class with the required parameters:

from keboola_streamlit import KeboolaStreamlit

keboola = KeboolaStreamlit(root_url='https://connection.keboola.com', token='YOUR_API_TOKEN')

Authentication Check

Ensure that the user is authenticated and authorized to access the Streamlit app:

keboola.auth_check(required_role_id='YOUR_REQUIRED_ROLE_ID')

Retrieve Data

Fetch data from a Keboola Storage table and return it as a Pandas DataFrame:

df = keboola.get_table(table_id='YOUR_TABLE_ID')

Load Data

Load data from a Pandas DataFrame into a Keboola Storage table:

keboola.load_table(table_id='YOUR_TABLE_ID', df=your_dataframe, is_incremental=False)

Create Event

Create an event in Keboola Storage to log activities:

keboola.create_event()

Add Keboola Table Selection

Add a Keboola table selection form to your Streamlit app sidebar:

selected_table_data = keboola.add_table_selection()

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keboola_streamlit-0.0.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

keboola_streamlit-0.0.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file keboola_streamlit-0.0.3.tar.gz.

File metadata

  • Download URL: keboola_streamlit-0.0.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.8

File hashes

Hashes for keboola_streamlit-0.0.3.tar.gz
Algorithm Hash digest
SHA256 64b834f6c98ce4f747eb4293c5158d34653a778104a610e2fe40e554d4717338
MD5 6ac0f7b96b48f309a2b5e37b4fa3d0fa
BLAKE2b-256 72a03cd71edf22ef05376a735717a462a379b3aa2707e55229a79a2e94cb86d6

See more details on using hashes here.

File details

Details for the file keboola_streamlit-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for keboola_streamlit-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c64de9d7359c0d62fbb0ded68ff97886e2a29d66be955dfd4e989b39ae9ff2f9
MD5 6a7f859e6552c496d5820ad4049755bb
BLAKE2b-256 05408bb1740659156a66964dc746699b681fb78be1111a53805a63033e38f5c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page