skillfed

writer-sdk

The official Python library for the writer API

writer-sdk v3.0.0 646.4K downloads/30d#5,595 on PyPI11
Permissive license Apache-2.0 Active released

What it is and what it does

Writer-sdk is the official Python client for the Writer REST API, generated by Stainless. It provides both synchronous and asynchronous interfaces to call Writer's chat completion endpoints, with built-in support for streaming responses via Server-Side Events, automatic pagination, and file uploads. The library handles authentication via the WRITER_API_KEY environment variable and uses httpx for HTTP transport by default, with an optional aiohttp backend for improved async concurrency.

The package is designed for developers integrating Writer's AI capabilities into Python applications. It includes type hints throughout, supports Python 3.9 through 3.14, and abstracts away REST details so you can focus on building features. Streaming helpers and auto-paginating iterators reduce boilerplate for common patterns like iterating through paginated lists or processing streamed chat deltas.

Use it for:

  • Build a chatbot or conversational AI application that calls Writer's chat API with streaming responses.
  • Integrate Writer's language models into a data pipeline or batch processing system using async calls.
  • Fetch and iterate through paginated lists of resources without manual page management.
  • Stream chat completions to a web UI or terminal, displaying tokens as they arrive.
  • Prototype or test Writer API endpoints before deploying to production infrastructure.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python client library for the Writer REST API, supporting synchronous and asynchronous chat completions, streaming responses, pagination, and file uploads.

Yes. The package is actively maintained, has low install friction, carries a permissive Apache-2.0 license, and has no known vulnerabilities. Install it if you are building a Python application that needs to call the Writer API; it handles authentication, streaming, pagination, and async/sync patterns out of the box. The only prerequisite is a valid Writer API key.

Install

writer-sdk on PyPI

pip

pip install writer-sdk

uv

uv add writer-sdk

poetry

poetry add writer-sdk

Installing writer-sdk

Before you install

Low install friction with a pure-wheel distribution. Active maintenance with a recent commit on 2026-07-17 and releases within the past 73 days. Eight runtime dependencies are all well-established packages.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.

Quickstart

pip install writer-sdk

from writer_sdk import Writer

client = Writer()  # Reads WRITER_API_KEY from environment
chat_completion = client.chat.chat(
    messages=[{"content": "Write a haiku about programming", "role": "user"}],
    model="palmyra-x5",
)
print(chat_completion.choices[0].message.content)

Requires WRITER_API_KEY environment variable or explicit api_key parameter; Python 3.9 or higher.

Verify before relying

  • Whether the MCP Server integration is production-ready or experimental.
  • Specific rate limits or quota behavior of the Writer API itself.
  • Whether aiohttp integration (optional extra) is recommended over default httpx for production workloads.
  • Exact import path and module structure for the Writer client class.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 8 — anyio, cached-property, distro, httpx, jiter, pydantic, sniffio, typing-extensions
Maintenance actively maintained — 73 days since the last release
Last repo commit
First released
Downloads 646,381/month — #5,595 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: writer_sdk-3.0.0-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

writer api python clientllm chat completion sdkasync rest api wrapperstreaming sse responsesai api integration library
llm-clientrest-api-wrapperasync-support

More Python Modules packages