Install & Compatibility
Where this runs
tested against v0.1.62 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✕ timeout
py 3.11
✕ build_error
✕ timeout
py 3.12
✕ build_error
✓ 18.9s
86MB installed
● package 86MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
IndentClient
✓ from exponent import IndentClient
✗ from indent.exponent import IndentClient
This quickstart demonstrates how to initialize the IndentClient with your API key and use the chat completions endpoint to generate code. It expects the API key to be set as an environment variable `INDENT_API_KEY`.
import os
from indent import IndentClient
# Ensure your INDENT_API_KEY is set as an environment variable
# Example: export INDENT_API_KEY='your_api_key_here'
api_key = os.environ.get("INDENT_API_KEY", "")
if not api_key:
raise ValueError("INDENT_API_KEY environment variable not set.")
client = IndentClient(api_key=api_key)
# Example: Generate code using the chat completions API
try:
response = client.chat.completions.create(
messages=[
{"role": "user", "content": "Write a Python function to reverse a string."}
]
)
print("Generated code:\n", response.choices[0].message.content)
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingThe Indent Python SDK is explicitly stated to be 'still in early development.' This implies that breaking changes, API alterations, and functional instability should be expected across minor versions.fixAlways consult the latest GitHub README and documentation before upgrading. Pin exact versions in production environments to avoid unexpected breaks.
affects: <1.0.0
gotchaIndent's API client (IndentClient) uses an interface highly similar to the OpenAI Python SDK v1. Users familiar with older OpenAI SDK versions (pre-1.0) or other LLM libraries might encounter unexpected method signatures or behaviors.fixRefer to the Indent SDK documentation or examples for the correct method calls, especially for `client.chat.completions.create` and its parameters. Do not assume direct compatibility with pre-1.0 OpenAI code.
affects: All current versions
gotchaAuthentication requires an `INDENT_API_KEY` which must be provided to the `IndentClient`. If this key is missing or invalid, API calls will fail, often with unhandled exceptions if not properly caught.fixEnsure `INDENT_API_KEY` is set as an environment variable or passed directly to `IndentClient(api_key='your_key')`. Always include error handling around API calls to catch authentication or network issues.
affects: All current versions
Upgrade
Version history
0.1.62latest on PyPI · released Apr 25, 2026
Audit
Dependencies
httpxrequiredHTTP client for making requests to the Indent API.
openai-v1requiredProvides the OpenAI-compatible API structure and functionality for interacting with Indent services.
pydanticrequiredData validation and settings management, likely for API request/response models.