Skip to main content

Simple Python client for the Sheetsight Search API

Project description

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 to https://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

MIT

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.

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

sheetsight-0.1.1.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sheetsight-0.1.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file sheetsight-0.1.1.tar.gz.

File metadata

  • Download URL: sheetsight-0.1.1.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for sheetsight-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b2540c11cf8dc8683b630936d696f7e0d358cfe300c655eec97d9d41700748bd
MD5 412699656c058075f0984caea48863fb
BLAKE2b-256 fe1beb9638c34fc096854c19098c78c777116ac4495985b3959071f5fa32a1b1

See more details on using hashes here.

File details

Details for the file sheetsight-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sheetsight-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for sheetsight-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8ca1e06739b90385b45cd3703153ea72b11c80f73288c89ed81d29a5fff76b9
MD5 3debe9aa42eea0b6112095036ff9d86f
BLAKE2b-256 76f5d1078682bceedd6532809831822299930c1ea833427bd0dd423c1fc80af4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page