Skip to main content

Kaggle dataset connector for Streamlit

Project description

Open Demo App

Custom component that allows to import Kaggle datasets to Streamlit apps.

Kaggle is the world's largest data science community. It enables users to explore and analyze a wide variety of public datasets. This app demonstrates a simple KaggleDatasetConnection which was built by extending the built-in BaseConnection You can view the connection source code here.

While Kaggle offers datasets in different formats, this connector ONLY supports CSV files.

A user can connect to a Kaggle dataset by providing the dataset path and filename. The path is the part of the dataset URL after the domain name, the structure is following: username/dataset-name. For example, for the dataset https://www.kaggle.com/shivamb/netflix-shows, the path is shivamb/netflix-shows, and the file name is netflix_titles.csv.

Using this example, the code to connect to the dataset would look like this:

from connection import KaggleDatasetConnection
import streamlit as st

conn = st.connection("kaggle_datasets", type=KaggleDatasetConnection)
df = conn.get(path='shivamb/netflix-shows', filename='netflix_titles.csv', ttl=3600)

KaggleDatasetConnection` class assumes that you have secrets set up in the following format:

[connections.kaggle_datasets]
 KAGGLE_USERNAME = "insert your Kaggle username"
 KAGGLE_KEY = "insert your Kaggle API key"

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

st_kaggle_connector-0.1.2.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

st_kaggle_connector-0.1.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file st_kaggle_connector-0.1.2.tar.gz.

File metadata

  • Download URL: st_kaggle_connector-0.1.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for st_kaggle_connector-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2143ec3a5bb229bb686d5f99b3bca8969445104c09768c74ae019988535df621
MD5 4381a5a20d96b8171adf57ce5313ed69
BLAKE2b-256 ee9687f0e965a7aa61615d0e8dcb5bdc87ffc87beddbe49f40a52f04da53aff7

See more details on using hashes here.

Provenance

File details

Details for the file st_kaggle_connector-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for st_kaggle_connector-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 718143e8c40478cc3b0d55734ec6c5520f6aacf9b7fa3be377959cd90217170f
MD5 221ad7106177c08e2bb1a4df4f8f4392
BLAKE2b-256 ac7ea27d90f8858e66aa899c9ce74f4ac802b3f0a4ea36d6c68b0409186709e2

See more details on using hashes here.

Provenance

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