-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(python): Implement bindings to IPC writer (#586)
This PR implements bindings to the IPC writer in the nanoarrow C library. This adds: - An `ipc.StreamWriter()` class roughly mirroring pyarrow's `ipc.Stream()` - `Schema.serialize()` and `Array.serialize()` to match pyarrow's `serialize()` methods. ```python import io import nanoarrow as na from nanoarrow.ipc import StreamWriter, InputStream out = io.BytesIO() writer = StreamWriter.from_writable(out) writer.write_stream(InputStream.example()) na.Array(InputStream.from_readable(out.getvalue())) #> nanoarrow.Array<non-nullable struct<some_col: int32>>[3] #> {'some_col': 1} #> {'some_col': 2} #> {'some_col': 3} ``` --------- Co-authored-by: Joris Van den Bossche <[email protected]>
- Loading branch information
1 parent
43001a9
commit 3aa0ec1
Showing
10 changed files
with
699 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.