[![Open Demo App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://kaggle-data-connector.streamlit.app/)
Custom component that allows to import Kaggle datasets to Streamlit apps.
[Kaggle](https://www.kaggle.com/) 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](https://docs.streamlit.io/library/api-reference/connections/st.connections.experimentalbaseconnection)
You can view the connection source code
[here](https://github.com/arsentievalex/kaggle-streamlit-data-connector/blob/main/connection.py).
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 st_kaggle_connector 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"
```
Raw data
{
"_id": null,
"home_page": "https://github.com/arsentievalex/kaggle-streamlit-data-connector/tree/main",
"name": "st-kaggle-connector",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "streamlit,custom,component,kaggle,dataset,connector",
"author": "Oleksandr Arsentiev",
"author_email": "<arsentiev9393@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/97/bd/d7285c6a40c6809f91ff3b54cb4f170938fa9543027dcdb0cd065977b11f/st_kaggle_connector-0.1.3.tar.gz",
"platform": null,
"description": "[![Open Demo App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://kaggle-data-connector.streamlit.app/)\r\n\r\nCustom component that allows to import Kaggle datasets to Streamlit apps.\r\n\r\n[Kaggle](https://www.kaggle.com/) is the world's largest data science community. It enables users to explore and analyze a wide variety of public datasets.\r\nThis app demonstrates a simple `KaggleDatasetConnection` which was built by extending the \r\n[built-in BaseConnection](https://docs.streamlit.io/library/api-reference/connections/st.connections.experimentalbaseconnection)\r\nYou can view the connection source code\r\n[here](https://github.com/arsentievalex/kaggle-streamlit-data-connector/blob/main/connection.py).\r\n\r\nWhile Kaggle offers datasets in different formats, this connector ONLY supports CSV files.\r\n\r\nA user can connect to a Kaggle dataset by providing the dataset path and filename.\r\nThe path is the part of the dataset URL after the domain name, the structure is following: username/dataset-name.\r\nFor example, for the dataset https://www.kaggle.com/shivamb/netflix-shows, the path is `shivamb/netflix-shows`,\r\nand the file name is `netflix_titles.csv`.\r\n\r\nUsing this example, the code to connect to the dataset would look like this:\r\n\r\n```\r\nfrom st_kaggle_connector import KaggleDatasetConnection\r\nimport streamlit as st\r\n\r\nconn = st.connection(\"kaggle_datasets\", type=KaggleDatasetConnection)\r\ndf = conn.get(path='shivamb/netflix-shows', filename='netflix_titles.csv', ttl=3600)\r\n```\r\n\r\nKaggleDatasetConnection` class assumes that you have secrets set up in the following format:\r\n\r\n```\r\n[connections.kaggle_datasets]\r\n KAGGLE_USERNAME = \"insert your Kaggle username\"\r\n KAGGLE_KEY = \"insert your Kaggle API key\"\r\n```\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Kaggle dataset connector for Streamlit",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/arsentievalex/kaggle-streamlit-data-connector/tree/main"
},
"split_keywords": [
"streamlit",
"custom",
"component",
"kaggle",
"dataset",
"connector"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9b06f8ad22e0e79cc7e084ea93f587d54624aa81dd36f4dd6b958072df67a2e7",
"md5": "58e65e7f8eee70a3b878d0183fb31efb",
"sha256": "a23800daa54edaca76a7e6036772e0533dac60ae797f2cfca8014384e0ee5c1f"
},
"downloads": -1,
"filename": "st_kaggle_connector-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "58e65e7f8eee70a3b878d0183fb31efb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3010,
"upload_time": "2023-12-04T13:32:46",
"upload_time_iso_8601": "2023-12-04T13:32:46.510763Z",
"url": "https://files.pythonhosted.org/packages/9b/06/f8ad22e0e79cc7e084ea93f587d54624aa81dd36f4dd6b958072df67a2e7/st_kaggle_connector-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "97bdd7285c6a40c6809f91ff3b54cb4f170938fa9543027dcdb0cd065977b11f",
"md5": "d666ab9238c69659b61d4eb9126d65df",
"sha256": "0b03c388c1bf4f8f0411e0c1ca58f143ed9d71375944b9454c20758a3bcf6243"
},
"downloads": -1,
"filename": "st_kaggle_connector-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "d666ab9238c69659b61d4eb9126d65df",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2678,
"upload_time": "2023-12-04T13:32:48",
"upload_time_iso_8601": "2023-12-04T13:32:48.596148Z",
"url": "https://files.pythonhosted.org/packages/97/bd/d7285c6a40c6809f91ff3b54cb4f170938fa9543027dcdb0cd065977b11f/st_kaggle_connector-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-04 13:32:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "arsentievalex",
"github_project": "kaggle-streamlit-data-connector",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "st-kaggle-connector"
}