Metadata-Version: 2.4
Name: tiiny-sdk
Version: 0.1.4
Summary: Tiiny SDK for edge computing power box communication
Author-email: Tiiny Team <team@tiiny.com>
License: MIT
Project-URL: Homepage, https://github.com/tiiny/tiiny-sdk
Project-URL: Documentation, https://tiiny-sdk.readthedocs.io
Project-URL: Repository, https://github.com/tiiny/tiiny-sdk.git
Project-URL: Issues, https://github.com/tiiny/tiiny-sdk/issues
Keywords: edge-computing,usb,sdk,ai
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
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pyserial>=3.5
Requires-Dist: pyusb>=1.2.0
Requires-Dist: requests>=2.28.0
Requires-Dist: typing-extensions>=4.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: isort>=5.10.0; extra == "dev"
Requires-Dist: flake8>=5.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: pre-commit>=2.20.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.6.0; extra == "docs"
Requires-Dist: mkdocs-material>=9.5.0; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.25.0; extra == "docs"
Requires-Dist: pymdown-extensions>=10.0.0; extra == "docs"
Dynamic: license-file

# Tiiny SDK

A Python SDK for communicating with Tiiny edge computing power boxes via USB-C connection.

## Overview

The Tiiny SDK provides a simple, OpenAI-like interface for interacting with Tiiny edge computing devices. The workflow involves:

1. Detecting if the device is connected to the host computer
2. Authenticating with the device
3. Sending chat completions requests to the edge computing device

## Installation

```bash
pip install tiiny-sdk
```

## Quick Start

```python
import tiiny

# Initialize the client
client = tiiny.TiinyClient()

# Check if device is connected
if client.is_device_connected():
    # Authenticate with the device
    client.login(api_key="your-api-key")
    
    # Send a chat completion request
    response = client.chat.completions.create(
        model="tiiny-edge",
        messages=[
            {"role": "user", "content": "Hello, edge device!"}
        ]
    )
    print(response.choices[0].message.content)
else:
    print("No Tiiny device found. Please check your USB connection.")
```

## Features

- **Device Detection**: Automatically detect connected Tiiny devices
- **Authentication**: Secure login with API keys
- **Chat Completions**: OpenAI-compatible chat interface
- **Error Handling**: Comprehensive error handling and logging
- **Type Hints**: Full type annotation support

## Requirements

- Python 3.8+
- USB-C connection to Tiiny edge computing device
- Valid API key for authentication

## Development

Install development dependencies:

```bash
pip install -e ".[dev]"
```

Run tests:

```bash
pytest
```

## License

MIT License - see LICENSE file for details.
