Metadata-Version: 2.4
Name: lmstd
Version: 0.2.0
Summary: LM Studio v1 REST API Client Library
Author: LM Studio User
License-Expression: MIT
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Dynamic: license-file

# LMStd

LM Studio v1 REST API Client Library

This single-file library provides a clean, fully documented Python interface 
to interact with an LM Studio local server based on the v1 REST API endpoints.

## Installation

You can install this package via pip once published or from the source code:

```bash
pip install lmstd
```

## Usage

```python
import os
from lmstd import LMStd

# Initialize the client
client = LMStd(
    base_url="http://localhost:1234", 
    api_token=os.environ.get("LMSTD_APIKEY")
)

# List available models
models = client.list_models()
print(models)
```

## Features

- **Stateful chats**: Fully utilize the stateful `/api/v1/chat` endpoint.
- **Model Context Protocol (MCP)**: Use integrations and MCP tools directly.
- **Advanced Model Management**: Load, unload, and download models programmatically.
- **Streaming Support**: Easy SSE-based chat streaming support.

## License

Copyright (c) 2026 EMuVi (emuvi@outlook.com.br)

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