Skip to content

Commit a80559a

Browse files
authored
Improve buffer protocol documentation in put (#409)
1 parent 49628ca commit a80559a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

obstore/python/obstore/_put.pyi

+4-3
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ def put(
105105
- A file-like object opened in binary read mode
106106
- A [`Path`][pathlib.Path] to a local file
107107
- A [`bytes`][] object.
108-
- Any object implementing the Python [buffer
108+
- An object implementing the Python [buffer
109109
protocol](https://docs.python.org/3/c-api/buffer.html) (includes `bytes`
110-
but also `memoryview`, numpy arrays, and more).
110+
but also `memoryview`, numpy arrays, and more). Note that only
111+
1-dimensional, contiguous, uint8-typed buffers are supported.
111112
- An iterator or iterable of objects implementing the Python buffer
112113
protocol.
113114
@@ -146,7 +147,7 @@ async def put_async(
146147
147148
Refer to the documentation for [`put`][obstore.put]. In addition to what the
148149
synchronous `put` allows for the `file` parameter, this **also supports an async
149-
iterator or iterable** of objects implementing the Python buffer protocol.
150+
iterator or iterable** of buffers.
150151
151152
This means, for example, you can pass the result of `get_async` directly to
152153
`put_async`, and the request will be streamed through Python during the put

0 commit comments

Comments
 (0)