Skip to content

Commit 7e885d4

Browse files
release: 2.4.0-rc1 (#251)
* chore: update lockfile * chore(docs): use environment variables for authentication in code snippets * fix(types): allow pyright to infer TypedDict types within SequenceNotStr * chore: add missing docstrings * chore(internal): add missing files argument to base client * chore: speedup initial import * fix: use async_to_httpx_files in patch method * chore(internal): add `--fix` argument to lint script * chore(internal): codegen related update * docs: prominently feature MCP server setup in root SDK readmes * feat(api): manual updates Manually adding the default_retires config to the stainless config * feat(api): manual updates Manually updated max_retries param * release: 2.4.0-rc1 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent a43534c commit 7e885d4

36 files changed

Lines changed: 722 additions & 209 deletions

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.3.3-rc1"
2+
".": "2.4.0-rc1"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 33
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/writerai%2Fwriter-ea6ec4b34f6b7fdecc564f59b2e31482eee05830bf8dc1f389461b158de1548e.yml
33
openapi_spec_hash: ea89c1faed473908be2740efe6da255f
4-
config_hash: 886645f89dc98f04b8931eaf02854e5f
4+
config_hash: 247c2ce23a36ef7446d356308329c87b

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Changelog
22

3+
## 2.4.0-rc1 (2026-01-12)
4+
5+
Full Changelog: [v2.3.3-rc1...v2.4.0-rc1](https://github.com/writer/writer-python/compare/v2.3.3-rc1...v2.4.0-rc1)
6+
7+
### Features
8+
9+
* **api:** manual updates ([26cd543](https://github.com/writer/writer-python/commit/26cd543764608a8d44ac5415a89ea98953672e08))
10+
* **api:** manual updates ([f95b625](https://github.com/writer/writer-python/commit/f95b6253dbc413b744cc5943c383b2ecbc0ccd44))
11+
12+
13+
### Bug Fixes
14+
15+
* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([d1f6535](https://github.com/writer/writer-python/commit/d1f6535dcef1167e31b53c4e0c030e9f7459821b))
16+
* use async_to_httpx_files in patch method ([a6fbc3c](https://github.com/writer/writer-python/commit/a6fbc3c52c4afe6ce8ce234ac5c9d8464bae2463))
17+
18+
19+
### Chores
20+
21+
* add missing docstrings ([a3c938c](https://github.com/writer/writer-python/commit/a3c938c5ad76f43870d9f48145d5a10a7757bcd1))
22+
* **docs:** use environment variables for authentication in code snippets ([534af15](https://github.com/writer/writer-python/commit/534af15961290aaae496780d712eaffa82d569e8))
23+
* **internal:** add `--fix` argument to lint script ([4b3b067](https://github.com/writer/writer-python/commit/4b3b06799d69c1bf79a1cc92b3d4083a1f0317bc))
24+
* **internal:** add missing files argument to base client ([9672ca2](https://github.com/writer/writer-python/commit/9672ca2a93a1f8b2545da624a88109e9d7f7bcc3))
25+
* **internal:** codegen related update ([ddab89d](https://github.com/writer/writer-python/commit/ddab89ddfaf2901c80213110584ed6509001c96b))
26+
* speedup initial import ([4ae973c](https://github.com/writer/writer-python/commit/4ae973c1bd3100e4a071f18f0d46ab22684eb9ef))
27+
* update lockfile ([abd7b3d](https://github.com/writer/writer-python/commit/abd7b3dd4ab2ab0f64359a806fd8aafc16f476dc))
28+
29+
30+
### Documentation
31+
32+
* prominently feature MCP server setup in root SDK readmes ([8ed50d2](https://github.com/writer/writer-python/commit/8ed50d2ee1c708254dc4d8c34fc563eed7b946dd))
33+
334
## 2.3.3-rc1 (2025-12-01)
435

536
Full Changelog: [v2.3.2...v2.3.3-rc1](https://github.com/writer/writer-python/compare/v2.3.2...v2.3.3-rc1)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 Writer
189+
Copyright 2026 Writer
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ of Writer into your projects.
99

1010
It is generated with [Stainless](https://www.stainless.com/).
1111

12+
## MCP Server
13+
14+
Use the Writer MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
15+
16+
[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=writer-sdk-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIndyaXRlci1zZGstbWNwIl19)
17+
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22writer-sdk-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22writer-sdk-mcp%22%5D%7D)
18+
19+
> Note: You may need to set environment variables in your MCP client.
20+
1221
## Documentation
1322

1423
The REST API documentation can be found on [dev.writer.com](https://dev.writer.com/api-guides/introduction). The full API of this library can be found in [api.md](api.md).
@@ -122,14 +131,15 @@ pip install --pre writer-sdk[aiohttp]
122131
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
123132

124133
```python
134+
import os
125135
import asyncio
126136
from writerai import DefaultAioHttpClient
127137
from writerai import AsyncWriter
128138

129139

130140
async def main() -> None:
131141
async with AsyncWriter(
132-
api_key="My API Key",
142+
api_key=os.environ.get("WRITER_API_KEY"), # This is the default and can be omitted
133143
http_client=DefaultAioHttpClient(),
134144
) as client:
135145
chat_completion = await client.chat.chat(
@@ -373,9 +383,9 @@ Error codes are as follows:
373383

374384
### Retries
375385

376-
The library automatically retries certain errors two times by default, with a short exponential backoff.
377-
Connection errors (for example, due to a network connectivity problem), `408 Request Timeout`, `409 Conflict`,
378-
`429 Rate Limit`, and `>=500 Internal errors` are all retried by default.
386+
Certain errors are automatically retried 7 times by default, with a short exponential backoff.
387+
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
388+
429 Rate Limit, and >=500 Internal errors are all retried by default.
379389

380390
You can use the `max_retries` option to configure or disable retry settings:
381391

pyproject.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
[project]
22
name = "writer-sdk"
3-
version = "2.3.3-rc1"
3+
version = "2.4.0-rc1"
44
description = "The official Python library for the writer API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
77
authors = [
88
{ name = "Writer", email = "dev-feedback@writer.com" },
99
]
10+
1011
dependencies = [
11-
"httpx>=0.23.0, <1",
12-
"pydantic>=1.9.0, <3",
13-
"typing-extensions>=4.10, <5",
14-
"anyio>=3.5.0, <5",
15-
"distro>=1.7.0, <2",
16-
"sniffio",
12+
"httpx>=0.23.0, <1",
13+
"pydantic>=1.9.0, <3",
14+
"typing-extensions>=4.10, <5",
15+
"anyio>=3.5.0, <5",
16+
"distro>=1.7.0, <2",
17+
"sniffio",
1718
"cached-property; python_version < '3.8'",
1819
"jiter>=0.4.0, <1",
1920
]
21+
2022
requires-python = ">= 3.9"
2123
classifiers = [
2224
"Typing :: Typed",

requirements-dev.lock

Lines changed: 59 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -12,44 +12,47 @@
1212
-e file:.
1313
aiohappyeyeballs==2.6.1
1414
# via aiohttp
15-
aiohttp==3.12.8
15+
aiohttp==3.13.2
1616
# via httpx-aiohttp
1717
# via writer-sdk
18-
aiosignal==1.3.2
18+
aiosignal==1.4.0
1919
# via aiohttp
20-
annotated-types==0.6.0
20+
annotated-types==0.7.0
2121
# via pydantic
22-
anyio==4.4.0
22+
anyio==4.12.0
2323
# via httpx
2424
# via writer-sdk
25-
argcomplete==3.1.2
25+
argcomplete==3.6.3
2626
# via nox
2727
asttokens==3.0.0
2828
# via inline-snapshot
2929
async-timeout==5.0.1
3030
# via aiohttp
31-
attrs==25.3.0
31+
attrs==25.4.0
3232
# via aiohttp
33-
certifi==2023.7.22
33+
# via nox
34+
backports-asyncio-runner==1.2.0
35+
# via pytest-asyncio
36+
certifi==2025.11.12
3437
# via httpcore
3538
# via httpx
36-
colorlog==6.7.0
39+
colorlog==6.10.1
3740
# via nox
38-
dirty-equals==0.6.0
39-
distlib==0.3.7
41+
dependency-groups==1.3.1
42+
# via nox
43+
dirty-equals==0.11
44+
distlib==0.4.0
4045
# via virtualenv
41-
distro==1.8.0
46+
distro==1.9.0
4247
# via writer-sdk
43-
exceptiongroup==1.2.2
48+
exceptiongroup==1.3.1
4449
# via anyio
4550
# via pytest
46-
execnet==2.1.1
51+
execnet==2.1.2
4752
# via pytest-xdist
48-
executing==2.2.0
49-
# via inline-snapshot
50-
filelock==3.12.4
53+
filelock==3.19.1
5154
# via virtualenv
52-
frozenlist==1.6.2
55+
frozenlist==1.8.0
5356
# via aiohttp
5457
# via aiosignal
5558
h11==0.16.0
@@ -62,12 +65,14 @@ httpx==0.28.1
6265
# via writer-sdk
6366
httpx-aiohttp==0.1.9
6467
# via writer-sdk
65-
idna==3.4
68+
humanize==4.13.0
69+
# via nox
70+
idna==3.11
6671
# via anyio
6772
# via httpx
6873
# via yarl
69-
importlib-metadata==7.0.0
70-
iniconfig==2.0.0
74+
importlib-metadata==8.7.0
75+
iniconfig==2.1.0
7176
# via pytest
7277
inline-snapshot==0.20.5
7378
jiter==0.8.2
@@ -76,74 +81,74 @@ markdown-it-py==3.0.0
7681
# via rich
7782
mdurl==0.1.2
7883
# via markdown-it-py
79-
multidict==6.4.4
84+
multidict==6.7.0
8085
# via aiohttp
8186
# via yarl
8287
mypy==1.17.0
83-
mypy-extensions==1.0.0
88+
mypy-extensions==1.1.0
8489
# via mypy
85-
nest-asyncio==1.6.0
86-
nodeenv==1.8.0
90+
nodeenv==1.9.1
8791
# via pyright
88-
nox==2023.4.22
89-
packaging==23.2
92+
nox==2025.11.12
93+
packaging==25.0
94+
# via dependency-groups
9095
# via nox
9196
# via pytest
9297
pathspec==0.12.1
9398
# via mypy
94-
platformdirs==3.11.0
99+
platformdirs==4.4.0
95100
# via virtualenv
96-
pluggy==1.5.0
101+
pluggy==1.6.0
97102
# via pytest
98-
propcache==0.3.1
103+
propcache==0.4.1
99104
# via aiohttp
100105
# via yarl
101-
pydantic==2.11.9
106+
pydantic==2.12.5
102107
# via writer-sdk
103-
pydantic-core==2.33.2
108+
pydantic-core==2.41.5
104109
# via pydantic
105-
pygments==2.18.0
110+
pygments==2.19.2
111+
# via pytest
106112
# via rich
107113
pyright==1.1.399
108-
pytest==8.3.3
114+
pytest==8.4.2
109115
# via pytest-asyncio
110116
# via pytest-xdist
111-
pytest-asyncio==0.24.0
112-
pytest-xdist==3.7.0
113-
python-dateutil==2.8.2
117+
pytest-asyncio==1.2.0
118+
pytest-xdist==3.8.0
119+
python-dateutil==2.9.0.post0
114120
# via time-machine
115-
pytz==2023.3.post1
116-
# via dirty-equals
117121
respx==0.22.0
118-
rich==13.7.1
119-
# via inline-snapshot
120-
ruff==0.9.4
121-
setuptools==68.2.2
122-
# via nodeenv
123-
six==1.16.0
122+
rich==14.2.0
123+
ruff==0.14.7
124+
six==1.17.0
124125
# via python-dateutil
125-
sniffio==1.3.0
126-
# via anyio
126+
sniffio==1.3.1
127127
# via writer-sdk
128-
time-machine==2.9.0
129-
tomli==2.0.2
130-
# via inline-snapshot
128+
time-machine==2.19.0
129+
tomli==2.3.0
130+
# via dependency-groups
131131
# via mypy
132+
# via nox
132133
# via pytest
133-
typing-extensions==4.12.2
134+
typing-extensions==4.15.0
135+
# via aiosignal
134136
# via anyio
137+
# via exceptiongroup
135138
# via multidict
136139
# via mypy
137140
# via pydantic
138141
# via pydantic-core
139142
# via pyright
143+
# via pytest-asyncio
140144
# via typing-inspection
145+
# via virtualenv
141146
# via writer-sdk
142-
typing-inspection==0.4.1
147+
typing-inspection==0.4.2
143148
# via pydantic
144-
virtualenv==20.24.5
149+
virtualenv==20.35.4
145150
# via nox
146-
yarl==1.20.0
151+
yarl==1.22.0
147152
# via aiohttp
148-
zipp==3.17.0
153+
zipp==3.23.0
149154
# via importlib-metadata

0 commit comments

Comments
 (0)