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.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: keboola_streamlit-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 90e6598ea48314554a782a2f78c9a241a034c09cca6b3e2bae56c0cfd9e1a049
MD5 f7972ec9ccef227de3cb563627ed5ded
BLAKE2b-256 0dc7f91d653c0eabecd58c6dd53ae982b82d39f43676bf7df55e26ba68b3b22c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for keboola_streamlit-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cd7b25fcec03bef2c46dae200e0bf224610572c699434bc1110a2154aa3171aa
MD5 5b14671030c9d5fbb896af14f9251794
BLAKE2b-256 bfd33452417ee2188c66333c9e298b449064756b8a5aa736b7a6ce0b8b9c1e22

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