Skip to main content

LM Studio v1 REST API Client Library

Project description

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:

pip install lmstd

Usage

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

MIT License

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

lmstd-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

lmstd-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file lmstd-0.1.0.tar.gz.

File metadata

  • Download URL: lmstd-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for lmstd-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9a6b45610fab72f059cd1d3c14a79dc71926f2074846d6abdd8307dfeca3164c
MD5 c048ab5290964255e5293fe704a70bcd
BLAKE2b-256 cad117dfa630437c197ad3143487bac5e64304dfb3252350900dc43030a3e463

See more details on using hashes here.

File details

Details for the file lmstd-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lmstd-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for lmstd-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b47e52d3e152d76733efa0b30ca1ed0ab4543a2301f3916b0477680a7069981
MD5 1217f844832ab7d0a8dce364d8fddd8b
BLAKE2b-256 ba843f21e4d0055c8fcb599d46dcca1d47afbde509d3e9ae00cb4d6e0f8094a6

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