You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,20 @@
1
1
# Changelog
2
2
3
+
## 2.0.0 (2025-02-26)
4
+
5
+
Full Changelog: [v2.0.0-rc1...v2.0.0](https://github.com/writer/writer-python/compare/v2.0.0-rc1...v2.0.0)
6
+
7
+
### Chores
8
+
9
+
***internal:** properly set __pydantic_private__ ([#197](https://github.com/writer/writer-python/issues/197)) ([533c0f8](https://github.com/writer/writer-python/commit/533c0f8c14ba78fb827fa494d25a4367612ad0fa))
10
+
***internal:** version bump ([#194](https://github.com/writer/writer-python/issues/194)) ([f75756f](https://github.com/writer/writer-python/commit/f75756f03a1e2083fc9cc6be66596a19606d1312))
11
+
12
+
13
+
### Documentation
14
+
15
+
* Add file upload examples to README. ([#199](https://github.com/writer/writer-python/issues/199)) ([628cf7f](https://github.com/writer/writer-python/commit/628cf7f3a0047af764d31b156709443175806d59))
16
+
***api:** updates to API spec ([#196](https://github.com/writer/writer-python/issues/196)) ([2867dbb](https://github.com/writer/writer-python/commit/2867dbbefe5b5795f043fc2641a5320e24bf0788))
17
+
3
18
## 2.0.0-rc1 (2025-02-21)
4
19
5
20
Full Changelog: [v1.6.1...v2.0.0-rc1](https://github.com/writer/writer-python/compare/v1.6.1...v2.0.0-rc1)
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -226,6 +226,27 @@ for graph in first_page.data:
226
226
print(graph.id)
227
227
```
228
228
229
+
## File uploads
230
+
231
+
You can pass file upload parameters as `bytes`, a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.
232
+
233
+
The `content_type` parameter is the [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/MIME_types/Common_types) of the file being uploaded. The file upload supports `txt`, `doc`, `docx`, `ppt`, `pptx`, `jpg`, `png`, `eml`, `html`, `pdf`, `srt`, `csv`, `xls`, and `xlsx` file extensions.
The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.
249
+
229
250
## Handling errors
230
251
231
252
When the library is unable to connect to the API (for example, due to network connection problems, a timeout, or a firewall that doesn't allow the connection), a subclass of `writerai.APIConnectionError` is raised.
0 commit comments