Skip to main content

No project description provided

Project description

Subsets Python Client

Easily access the Subsets data warehouse using Python. For more details and features, visit subsets.io

Installation

Run the following command to install the API:

pip install subsetsio

Usage

At the moment, you can only use the SDK for querying. To explore datasets, checking quotas, and viewing past queries, visit the subsets.io web interface.

import subsets

# Temp API Key. Sign up for a free permanent key.
client = subsets.client(api_key="YOUR_API_KEY")

user_query = "apple stock price"
# Search for tables, and rows within the table
response = client.search_tables(user_query, n=3)
# TODO: implement LLM function to convert text to sql
sql_query = text2sql(user_query, response.tables)
# Execute the query
df = client.query(sql_query)

License

MIT Licensed

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

subsetsio-0.5.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

subsetsio-0.5-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

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