Metadata-Version: 2.4
Name: llama-search
Version: 0.1.0
Summary: Python SDK for llama-search.com API
Author-email: LLaSea <llasea@gmail.com>
License: MIT License
        
        Copyright (c) 2025 llama-search
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://llama-search.com
Project-URL: Documentation, https://docs.llama-search.com
Project-URL: Repository, https://github.com/llama-search/llama-search
Project-URL: Bug Tracker, https://github.com/llama-search/llama-search/issues
Keywords: llama,search,api,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Requires-Dist: typing-extensions>=4.0.0
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: license-file

# llama-search Python SDK

A Python client library for the [llama-search.com](https://llama-search.com) API.

## Installation

```bash
pip install llama-search
```

## Quick Start

```python
from llama_search import LlamaSearchClient

# Initialize the client with your API key
client = LlamaSearchClient(api_key="your-api-key-here")

# Perform a search
results = client.search("python programming")
print(results)

# Check API status
status = client.get_status()
print(status)
```

## Authentication

You'll need an API key from [llama-search.com](https://llama-search.com). Sign up for an account and generate your API key from the dashboard.

## API Reference

### LlamaSearchClient

The main client class for interacting with the llama-search API.

#### `__init__(api_key, base_url="https://api.llama-search.com")`

Initialize the client with your API key.

- `api_key` (str): Your API key from llama-search.com
- `base_url` (str, optional): Base URL for the API

#### `search(query, limit=10, **kwargs)`

Perform a search query.

- `query` (str): Search query string
- `limit` (int): Maximum number of results to return (default: 10)
- `**kwargs`: Additional search parameters

Returns a dictionary containing search results.

#### `get_status()`

Get API status and health check information.

## Error Handling

The SDK includes custom exceptions:

- `LlamaSearchError`: Base exception for all SDK errors
- `APIError`: Raised for API-related errors
- `AuthenticationError`: Raised for authentication failures

```python
from llama_search import LlamaSearchClient, AuthenticationError, APIError

try:
    client = LlamaSearchClient(api_key="invalid-key")
    results = client.search("test query")
except AuthenticationError:
    print("Invalid API key")
except APIError as e:
    print(f"API error: {e}")
```

## Development

See [instructions.md](instructions.md) for development setup and contribution guidelines.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
