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

Uploaded Source

Built Distribution

keboola_streamlit-0.0.4-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: keboola_streamlit-0.0.4.tar.gz
  • Upload date:
  • Size: 5.9 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.4.tar.gz
Algorithm Hash digest
SHA256 9a3540a9bb1cfdefde170da74717ee214dfb1ade78ab767579b68e6f759f68de
MD5 b5ad82649c900c6c480fd5b943fcb44f
BLAKE2b-256 d1bd7ecf15d06e89fabe1abb3dcb13d51c86e1658815b5fad07d3e9a51f0337e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for keboola_streamlit-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b29f8d01baa7e86deb08f8d532b93b263fad5773299e0b21ff8c2096e4d08cf6
MD5 6a0a640a163b6fc5913d4867ef5efc7c
BLAKE2b-256 c3c6464d50a4f7030b262d71c332d096e4d823f81757f8b1c056a3de7af06e3c

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