Sheetsight Python Client
A simple Python client for the Sheetsight search API.
Installation
pip install sheetsight
Quick Start
from sheetsight_py import SheetsightClient
# Initialize client with your API key
client = SheetsightClient(api_key="your_api_key_here")
# Search for ESP32 power consumption information
results = client.search("ESP32 power consumption", max_results=5)
# Print results
print(f"Found {results['total_results']} results across {results['total_parts']} parts")
for group in results['grouped_results']:
part = group['part']
manufacturer = group['manufacturer']
print(f"\n{part['partNumber']} by {manufacturer['displayName']}")
print(f"Description: {part['description']}")
print(f"Matches: {group['matchCount']}")
# Show best match content
if group['bestMatch']:
content_preview = group['bestMatch']['content'][:200]
print(f"Content: {content_preview}...")
API Reference
SheetsightClient
Constructor
SheetsightClient(api_key: str, base_url: Optional[str] = None, timeout: Optional[float] = None)
api_key: Your Sheetsight API key (get from dashboard)base_url: Base URL for the API (defaults tohttps://sheetsight.ai)timeout: Request timeout in seconds (defaults to 30)
Methods
search(query, max_results=20, group_by_part=True, **kwargs)
Convenience method for searching with simplified parameters.
global_search(search_query, options=None)
Full-featured search method with all available options.
Options:
maxResults: Maximum number of results (1-50, default: 20)maxMatchesPerPart: Maximum matches per part (1-10, default: 3)includePartInfo: Include part information (default: True)groupByPart: Group results by part (default: True)
Context Manager Support
with SheetsightClient(api_key="your_key") as client:
results = client.search("ESP32")
# Client automatically closes when exiting context
Error Handling
from sheetsight_py import SheetsightClient, AuthenticationError, APIError
try:
client = SheetsightClient(api_key="invalid_key")
results = client.search("ESP32")
except AuthenticationError:
print("Invalid API key")
except APIError as e:
print(f"API error: {e}")
License
Contributing
Contributions are welcome! Whether it's bug fixes, feature additions, or documentation improvements, we appreciate your help in making this project better. For major changes or new features, please open an issue first to discuss what you would like to change.
Metadata
Release files for sheetsight 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 | |
|---|---|---|---|
| sheetsight-0.1.1.tar.gz | 7.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sheetsight-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.5 kB
Release files / sheetsight-0.1.1.tar.gz
| Download URL | sheetsight-0.1.1.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2540c11cf8dc8683b630936d696f7e0d358cfe300c655eec97d9d41700748bd
|
|
BLAKE2b-256 checksum How to use checksums |
fe1beb9638c34fc096854c19098c78c777116ac4495985b3959071f5fa32a1b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / sheetsight-0.1.1-py3-none-any.whl
| Download URL | sheetsight-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8ca1e06739b90385b45cd3703153ea72b11c80f73288c89ed81d29a5fff76b9
|
|
BLAKE2b-256 checksum How to use checksums |
76f5d1078682bceedd6532809831822299930c1ea833427bd0dd423c1fc80af4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|