Snow Leopard SDK for Python
Python client library for Snow Leopard Playground APIs.
Installation
pip install snowleopard
Quick Start
from snowleopard import SnowLeopardPlaygroundClient
# Initialize the client (or AsyncSnowLeopardPlaygroundClient)
client = SnowLeopardPlaygroundClient(api_key="your-api-key")
# Query your data in natural language
response = client.retrieve(
datafile_id="your-datafile-id",
user_query="How many users signed up last month?"
)
Getting Started
-
Get your API key from https://auth.snowleopard.ai/account/api_keys
-
Upload your datafiles at https://try.snowleopard.ai
-
Set your API key via environment variable:
export SNOWLEOPARD_API_KEY="your-api-key"
Or pass it directly to the client:
SnowLeopardPlaygroundClient(api_key="your-api-key")
Usage
Synchronous Client
from snowleopard import SnowLeopardPlaygroundClient
with SnowLeopardPlaygroundClient() as client:
# Get data directly from a natural language query
response = client.retrieve("datafile-id", "What's the total revenue?")
print(response.data)
# Stream natural language summary of live data
for chunk in client.response("datafile-id", "Show me top 10 customers"):
print(chunk)
Async Client
from snowleopard import AsyncSnowLeopardPlaygroundClient
async with AsyncSnowLeopardPlaygroundClient() as client:
# Get complete results
response = await client.retrieve("datafile-id", "What's the total revenue?")
print(response.data)
# Get streaming results
async for chunk in client.response("datafile-id", "Show me top 10 customers"):
print(chunk)
CLI
The SDK includes a command-line interface:
pip install snowleopard
snowy retrieve <datafile-id> "How many records are there?"
snowy response <datafile-id> "Summarize the data"
Contributing
For SDK developer docs and how to contribute, see CONTRIBUTING.md
Metadata
Release files for snowleopard 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| snowleopard-0.1.1.tar.gz | 6.3 kB | Without provenance | Details for snowleopard-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| snowleopard-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for snowleopard-0.1.1-py3-none-any.whl |
Total release size: 15.3 kB
Release files / snowleopard-0.1.1.tar.gz
| Download URL | snowleopard-0.1.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f335f36ca472e62de2ac965f58449e5640c92f950162b8c7c40ac4d5bd8ed994
|
|
BLAKE2b-256 checksum How to use checksums |
d139c6cb0656b0b0e8c0e108d64f1c46bd96ab4c4de39ed95fa105437dc6fb4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Release files / snowleopard-0.1.1-py3-none-any.whl
| Download URL | snowleopard-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c321b6e6ab7ff374b4d068aa77090466977928eb0903a2f3cef11a0d1093ef99
|
|
BLAKE2b-256 checksum How to use checksums |
5c877130a07038ef61e394662fb9a0bdc248f814e3c4aaeeb3ace2d5042c7887
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Security for snowleopard 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.