lightstream-io 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. lightstream_io-0.5.0/PKG-INFO +268 -0
  2. lightstream_io-0.5.0/README.md +241 -0
  3. lightstream_io-0.5.0/pyproject.toml +35 -0
  4. lightstream_io-0.5.0/python/Cargo.lock +2079 -0
  5. lightstream_io-0.5.0/python/Cargo.toml +103 -0
  6. lightstream_io-0.5.0/python/README.md +241 -0
  7. lightstream_io-0.5.0/python/build.rs +3 -0
  8. lightstream_io-0.5.0/python/examples/common/args.rs +34 -0
  9. lightstream_io-0.5.0/python/examples/common/datagen.py +23 -0
  10. lightstream_io-0.5.0/python/examples/common/datagen.rs +36 -0
  11. lightstream_io-0.5.0/python/examples/common/tls.rs +64 -0
  12. lightstream_io-0.5.0/python/examples/pipes/claude/produce.py +37 -0
  13. lightstream_io-0.5.0/python/examples/pipes/claude/watch.py +68 -0
  14. lightstream_io-0.5.0/python/examples/pipes/jq/consume.py +28 -0
  15. lightstream_io-0.5.0/python/examples/pipes/jq/produce.py +33 -0
  16. lightstream_io-0.5.0/python/examples/pipes/sed/consume.py +24 -0
  17. lightstream_io-0.5.0/python/examples/pipes/sed/produce.py +32 -0
  18. lightstream_io-0.5.0/python/examples/pipes/sql/feed.py +31 -0
  19. lightstream_io-0.5.0/python/examples/pipes/sql/query.py +54 -0
  20. lightstream_io-0.5.0/python/examples/run-example.py +319 -0
  21. lightstream_io-0.5.0/python/examples/transport/http/client.py +18 -0
  22. lightstream_io-0.5.0/python/examples/transport/http/server.py +35 -0
  23. lightstream_io-0.5.0/python/examples/transport/http/server.rs +45 -0
  24. lightstream_io-0.5.0/python/examples/transport/https/client.py +20 -0
  25. lightstream_io-0.5.0/python/examples/transport/https/server.py +38 -0
  26. lightstream_io-0.5.0/python/examples/transport/https/server.rs +51 -0
  27. lightstream_io-0.5.0/python/examples/transport/quic/client.py +20 -0
  28. lightstream_io-0.5.0/python/examples/transport/quic/server.py +38 -0
  29. lightstream_io-0.5.0/python/examples/transport/quic/server.rs +52 -0
  30. lightstream_io-0.5.0/python/examples/transport/stdio/client.py +14 -0
  31. lightstream_io-0.5.0/python/examples/transport/stdio/server.py +25 -0
  32. lightstream_io-0.5.0/python/examples/transport/stdio/server.rs +32 -0
  33. lightstream_io-0.5.0/python/examples/transport/tcp/client.py +18 -0
  34. lightstream_io-0.5.0/python/examples/transport/tcp/server.py +35 -0
  35. lightstream_io-0.5.0/python/examples/transport/tcp/server.rs +45 -0
  36. lightstream_io-0.5.0/python/examples/transport/uds/client.py +18 -0
  37. lightstream_io-0.5.0/python/examples/transport/uds/server.py +36 -0
  38. lightstream_io-0.5.0/python/examples/transport/uds/server.rs +52 -0
  39. lightstream_io-0.5.0/python/examples/transport/ws/client.py +18 -0
  40. lightstream_io-0.5.0/python/examples/transport/ws/server.py +35 -0
  41. lightstream_io-0.5.0/python/examples/transport/ws/server.rs +46 -0
  42. lightstream_io-0.5.0/python/examples/transport/wss/client.py +20 -0
  43. lightstream_io-0.5.0/python/examples/transport/wss/server.py +38 -0
  44. lightstream_io-0.5.0/python/examples/transport/wss/server.rs +51 -0
  45. lightstream_io-0.5.0/python/examples/transport/wt/client.py +20 -0
  46. lightstream_io-0.5.0/python/examples/transport/wt/server.py +38 -0
  47. lightstream_io-0.5.0/python/examples/transport/wt/server.rs +52 -0
  48. lightstream_io-0.5.0/python/rust-toolchain.toml +8 -0
  49. lightstream_io-0.5.0/python/src/errors.rs +60 -0
  50. lightstream_io-0.5.0/python/src/input.rs +556 -0
  51. lightstream_io-0.5.0/python/src/lib.rs +135 -0
  52. lightstream_io-0.5.0/python/src/listeners.rs +205 -0
  53. lightstream_io-0.5.0/python/src/message.rs +78 -0
  54. lightstream_io-0.5.0/python/src/output.rs +938 -0
  55. lightstream_io-0.5.0/python/src/runtime.rs +38 -0
  56. lightstream_io-0.5.0/python/src/tls.rs +144 -0
  57. lightstream_io-0.5.0/python/src/uri.rs +1747 -0
  58. lightstream_io-0.5.0/python/tests/test_accept.py +300 -0
  59. lightstream_io-0.5.0/python/tests/test_files.py +389 -0
  60. lightstream_io-0.5.0/python/tests/test_interop.py +99 -0
  61. lightstream_io-0.5.0/python/tests/test_network.py +267 -0
  62. lightstream_io-0.5.0/python/tests/test_protocol.py +150 -0
  63. lightstream_io-0.5.0/python/tests/test_tls_wires.py +295 -0
  64. lightstream_io-0.5.0/rust/Cargo.lock +5063 -0
  65. lightstream_io-0.5.0/rust/Cargo.toml +385 -0
  66. lightstream_io-0.5.0/rust/README.md +228 -0
  67. lightstream_io-0.5.0/rust/benches/README.md +216 -0
  68. lightstream_io-0.5.0/rust/benches/arrow/arrow_flight_comparison.rs +859 -0
  69. lightstream_io-0.5.0/rust/benches/aws/.dockerignore +7 -0
  70. lightstream_io-0.5.0/rust/benches/aws/README.md +146 -0
  71. lightstream_io-0.5.0/rust/benches/aws/receiver.rs +177 -0
  72. lightstream_io-0.5.0/rust/benches/aws/sender.rs +173 -0
  73. lightstream_io-0.5.0/rust/benches/common/arrow_flight_bench.rs +283 -0
  74. lightstream_io-0.5.0/rust/benches/common/bench_helpers.rs +544 -0
  75. lightstream_io-0.5.0/rust/benches/ecs/README.md +342 -0
  76. lightstream_io-0.5.0/rust/benches/ecs/sink.rs +824 -0
  77. lightstream_io-0.5.0/rust/benches/ecs/source.rs +891 -0
  78. lightstream_io-0.5.0/rust/benches/file/chunked_throughput.rs +547 -0
  79. lightstream_io-0.5.0/rust/benches/file/file_throughput.rs +523 -0
  80. lightstream_io-0.5.0/rust/benches/file/mmap_streaming.rs +565 -0
  81. lightstream_io-0.5.0/rust/benches/json/json_throughput.rs +142 -0
  82. lightstream_io-0.5.0/rust/benches/transport/ipc_throughput.rs +585 -0
  83. lightstream_io-0.5.0/rust/benches/transport/lightstream_throughput.rs +561 -0
  84. lightstream_io-0.5.0/rust/benches/transport/transport_bench_matrix.rs +1169 -0
  85. lightstream_io-0.5.0/rust/examples/arrow/ipc_basic.rs +161 -0
  86. lightstream_io-0.5.0/rust/examples/arrow/mmap.rs +139 -0
  87. lightstream_io-0.5.0/rust/examples/arrow/table_reader.rs +141 -0
  88. lightstream_io-0.5.0/rust/examples/arrow/table_stream_reader.rs +114 -0
  89. lightstream_io-0.5.0/rust/examples/arrow/table_stream_writer.rs +93 -0
  90. lightstream_io-0.5.0/rust/examples/arrow/table_writer.rs +104 -0
  91. lightstream_io-0.5.0/rust/examples/csv/basic.rs +107 -0
  92. lightstream_io-0.5.0/rust/examples/helpers/mod.rs +119 -0
  93. lightstream_io-0.5.0/rust/examples/http/arrow-parallel.rs +77 -0
  94. lightstream_io-0.5.0/rust/examples/http/arrow.rs +110 -0
  95. lightstream_io-0.5.0/rust/examples/lightstream/protobuf_arrow.rs +125 -0
  96. lightstream_io-0.5.0/rust/examples/lightstream/protocol.rs +299 -0
  97. lightstream_io-0.5.0/rust/examples/parquet/file_io.rs +429 -0
  98. lightstream_io-0.5.0/rust/examples/quic/arrow-parallel.rs +185 -0
  99. lightstream_io-0.5.0/rust/examples/quic/arrow.rs +182 -0
  100. lightstream_io-0.5.0/rust/examples/quic/lightstream.rs +150 -0
  101. lightstream_io-0.5.0/rust/examples/tcp/arrow.rs +80 -0
  102. lightstream_io-0.5.0/rust/examples/tcp/arrow_tls.rs +114 -0
  103. lightstream_io-0.5.0/rust/examples/tcp/lightstream.rs +53 -0
  104. lightstream_io-0.5.0/rust/examples/tlv/protocol.rs +98 -0
  105. lightstream_io-0.5.0/rust/examples/uds/arrow.rs +83 -0
  106. lightstream_io-0.5.0/rust/examples/uds/lightstream.rs +57 -0
  107. lightstream_io-0.5.0/rust/examples/websocket/arrow.rs +94 -0
  108. lightstream_io-0.5.0/rust/examples/websocket/arrow_tls.rs +125 -0
  109. lightstream_io-0.5.0/rust/examples/websocket/lightstream.rs +60 -0
  110. lightstream_io-0.5.0/rust/examples/webtransport/arrow.rs +105 -0
  111. lightstream_io-0.5.0/rust/examples/webtransport/lightstream.rs +81 -0
  112. lightstream_io-0.5.0/rust/flatb/File.fbs +52 -0
  113. lightstream_io-0.5.0/rust/flatb/Message.fbs +158 -0
  114. lightstream_io-0.5.0/rust/flatb/NOTES.md +26 -0
  115. lightstream_io-0.5.0/rust/flatb/Schema.fbs +438 -0
  116. lightstream_io-0.5.0/rust/flatb/SparseTensor.fbs +228 -0
  117. lightstream_io-0.5.0/rust/flatb/Tensor.fbs +54 -0
  118. lightstream_io-0.5.0/rust/pyarrow-roundtrip/generate_pyarrow_files.py +76 -0
  119. lightstream_io-0.5.0/rust/pyarrow-roundtrip/validate_lightstream_output.py +75 -0
  120. lightstream_io-0.5.0/rust/rust-toolchain.toml +9 -0
  121. lightstream_io-0.5.0/rust/src/arrow/file.rs +3672 -0
  122. lightstream_io-0.5.0/rust/src/arrow/message.rs +4457 -0
  123. lightstream_io-0.5.0/rust/src/arrow/schema.rs +3343 -0
  124. lightstream_io-0.5.0/rust/src/compression/ipc.rs +203 -0
  125. lightstream_io-0.5.0/rust/src/compression/mod.rs +164 -0
  126. lightstream_io-0.5.0/rust/src/constants.rs +144 -0
  127. lightstream_io-0.5.0/rust/src/enums.rs +119 -0
  128. lightstream_io-0.5.0/rust/src/error.rs +95 -0
  129. lightstream_io-0.5.0/rust/src/lib.rs +547 -0
  130. lightstream_io-0.5.0/rust/src/models/codecs/ipc.rs +302 -0
  131. lightstream_io-0.5.0/rust/src/models/codecs/lightstream.rs +434 -0
  132. lightstream_io-0.5.0/rust/src/models/codecs/mod.rs +22 -0
  133. lightstream_io-0.5.0/rust/src/models/decoders/csv.rs +1166 -0
  134. lightstream_io-0.5.0/rust/src/models/decoders/int_ascii.rs +121 -0
  135. lightstream_io-0.5.0/rust/src/models/decoders/ipc/mod.rs +616 -0
  136. lightstream_io-0.5.0/rust/src/models/decoders/ipc/parser.rs +2408 -0
  137. lightstream_io-0.5.0/rust/src/models/decoders/ipc/table_stream_decoder.rs +521 -0
  138. lightstream_io-0.5.0/rust/src/models/decoders/json/builder.rs +512 -0
  139. lightstream_io-0.5.0/rust/src/models/decoders/json/mod.rs +780 -0
  140. lightstream_io-0.5.0/rust/src/models/decoders/json/push.rs +351 -0
  141. lightstream_io-0.5.0/rust/src/models/decoders/json/row_decoder.rs +67 -0
  142. lightstream_io-0.5.0/rust/src/models/decoders/json/simd.rs +286 -0
  143. lightstream_io-0.5.0/rust/src/models/decoders/json/value.rs +139 -0
  144. lightstream_io-0.5.0/rust/src/models/decoders/limits.rs +152 -0
  145. lightstream_io-0.5.0/rust/src/models/decoders/parquet.rs +409 -0
  146. lightstream_io-0.5.0/rust/src/models/decoders/tlv.rs +149 -0
  147. lightstream_io-0.5.0/rust/src/models/encoders/csv.rs +729 -0
  148. lightstream_io-0.5.0/rust/src/models/encoders/int_ascii.rs +262 -0
  149. lightstream_io-0.5.0/rust/src/models/encoders/ipc/mod.rs +589 -0
  150. lightstream_io-0.5.0/rust/src/models/encoders/ipc/record_batch.rs +713 -0
  151. lightstream_io-0.5.0/rust/src/models/encoders/ipc/schema.rs +936 -0
  152. lightstream_io-0.5.0/rust/src/models/encoders/ipc/table_stream.rs +680 -0
  153. lightstream_io-0.5.0/rust/src/models/encoders/json.rs +627 -0
  154. lightstream_io-0.5.0/rust/src/models/encoders/parquet/data.rs +531 -0
  155. lightstream_io-0.5.0/rust/src/models/encoders/parquet/metadata.rs +679 -0
  156. lightstream_io-0.5.0/rust/src/models/encoders/tlv/mod.rs +100 -0
  157. lightstream_io-0.5.0/rust/src/models/encoders/tlv/tlv_stream.rs +168 -0
  158. lightstream_io-0.5.0/rust/src/models/frames/ipc_message.rs +157 -0
  159. lightstream_io-0.5.0/rust/src/models/frames/json.rs +113 -0
  160. lightstream_io-0.5.0/rust/src/models/frames/lightstream_message.rs +161 -0
  161. lightstream_io-0.5.0/rust/src/models/frames/tlv_frame.rs +31 -0
  162. lightstream_io-0.5.0/rust/src/models/frames/websocket.rs +335 -0
  163. lightstream_io-0.5.0/rust/src/models/interfaces/json/mod.rs +426 -0
  164. lightstream_io-0.5.0/rust/src/models/interfaces/json/path.rs +63 -0
  165. lightstream_io-0.5.0/rust/src/models/interfaces/json/schema.rs +110 -0
  166. lightstream_io-0.5.0/rust/src/models/interfaces/mod.rs +24 -0
  167. lightstream_io-0.5.0/rust/src/models/io_uring/buf.rs +48 -0
  168. lightstream_io-0.5.0/rust/src/models/io_uring/connection.rs +332 -0
  169. lightstream_io-0.5.0/rust/src/models/io_uring/mod.rs +36 -0
  170. lightstream_io-0.5.0/rust/src/models/io_uring/stream.rs +86 -0
  171. lightstream_io-0.5.0/rust/src/models/io_uring/websocket.rs +541 -0
  172. lightstream_io-0.5.0/rust/src/models/mmap.rs +308 -0
  173. lightstream_io-0.5.0/rust/src/models/protocol/ipc.rs +43 -0
  174. lightstream_io-0.5.0/rust/src/models/protocol/lightstream/connection.rs +317 -0
  175. lightstream_io-0.5.0/rust/src/models/protocol/lightstream/mod.rs +12 -0
  176. lightstream_io-0.5.0/rust/src/models/protocol/mod.rs +81 -0
  177. lightstream_io-0.5.0/rust/src/models/readers/chunked/arrow.rs +190 -0
  178. lightstream_io-0.5.0/rust/src/models/readers/chunked/csv.rs +268 -0
  179. lightstream_io-0.5.0/rust/src/models/readers/chunked/parquet.rs +247 -0
  180. lightstream_io-0.5.0/rust/src/models/readers/csv.rs +295 -0
  181. lightstream_io-0.5.0/rust/src/models/readers/http.rs +278 -0
  182. lightstream_io-0.5.0/rust/src/models/readers/ipc/file_table.rs +823 -0
  183. lightstream_io-0.5.0/rust/src/models/readers/ipc/mmap_table.rs +939 -0
  184. lightstream_io-0.5.0/rust/src/models/readers/ipc/table.rs +493 -0
  185. lightstream_io-0.5.0/rust/src/models/readers/ipc/window.rs +238 -0
  186. lightstream_io-0.5.0/rust/src/models/readers/json.rs +355 -0
  187. lightstream_io-0.5.0/rust/src/models/readers/lightstream.rs +247 -0
  188. lightstream_io-0.5.0/rust/src/models/readers/parallel/http.rs +254 -0
  189. lightstream_io-0.5.0/rust/src/models/readers/parallel/lightstream.rs +210 -0
  190. lightstream_io-0.5.0/rust/src/models/readers/parallel/quic.rs +192 -0
  191. lightstream_io-0.5.0/rust/src/models/readers/parallel/tcp.rs +193 -0
  192. lightstream_io-0.5.0/rust/src/models/readers/parquet.rs +1424 -0
  193. lightstream_io-0.5.0/rust/src/models/readers/quic.rs +144 -0
  194. lightstream_io-0.5.0/rust/src/models/readers/stdio.rs +158 -0
  195. lightstream_io-0.5.0/rust/src/models/readers/tcp.rs +192 -0
  196. lightstream_io-0.5.0/rust/src/models/readers/uds.rs +165 -0
  197. lightstream_io-0.5.0/rust/src/models/readers/websocket.rs +251 -0
  198. lightstream_io-0.5.0/rust/src/models/readers/webtransport.rs +153 -0
  199. lightstream_io-0.5.0/rust/src/models/serialise/ipc.rs +645 -0
  200. lightstream_io-0.5.0/rust/src/models/sinks/live_table_sink.rs +1538 -0
  201. lightstream_io-0.5.0/rust/src/models/sinks/table_sink.rs +235 -0
  202. lightstream_io-0.5.0/rust/src/models/sinks/tlv_sink.rs +240 -0
  203. lightstream_io-0.5.0/rust/src/models/streams/async_read.rs +105 -0
  204. lightstream_io-0.5.0/rust/src/models/streams/disk.rs +212 -0
  205. lightstream_io-0.5.0/rust/src/models/streams/framed_byte_stream.rs +136 -0
  206. lightstream_io-0.5.0/rust/src/models/streams/http.rs +155 -0
  207. lightstream_io-0.5.0/rust/src/models/streams/quic.rs +18 -0
  208. lightstream_io-0.5.0/rust/src/models/streams/stdio.rs +33 -0
  209. lightstream_io-0.5.0/rust/src/models/streams/stream_arena.rs +524 -0
  210. lightstream_io-0.5.0/rust/src/models/streams/tcp.rs +234 -0
  211. lightstream_io-0.5.0/rust/src/models/streams/uds.rs +120 -0
  212. lightstream_io-0.5.0/rust/src/models/streams/websocket.rs +944 -0
  213. lightstream_io-0.5.0/rust/src/models/streams/webtransport.rs +25 -0
  214. lightstream_io-0.5.0/rust/src/models/transports/http.rs +208 -0
  215. lightstream_io-0.5.0/rust/src/models/transports/quic.rs +137 -0
  216. lightstream_io-0.5.0/rust/src/models/transports/tcp.rs +66 -0
  217. lightstream_io-0.5.0/rust/src/models/transports/uds.rs +64 -0
  218. lightstream_io-0.5.0/rust/src/models/transports/websocket.rs +224 -0
  219. lightstream_io-0.5.0/rust/src/models/transports/webtransport.rs +75 -0
  220. lightstream_io-0.5.0/rust/src/models/types/parquet.rs +514 -0
  221. lightstream_io-0.5.0/rust/src/models/writers/chunked/arrow.rs +174 -0
  222. lightstream_io-0.5.0/rust/src/models/writers/chunked/csv.rs +167 -0
  223. lightstream_io-0.5.0/rust/src/models/writers/chunked/parquet.rs +162 -0
  224. lightstream_io-0.5.0/rust/src/models/writers/csv.rs +248 -0
  225. lightstream_io-0.5.0/rust/src/models/writers/http.rs +270 -0
  226. lightstream_io-0.5.0/rust/src/models/writers/ipc/sync_table.rs +309 -0
  227. lightstream_io-0.5.0/rust/src/models/writers/ipc/table.rs +509 -0
  228. lightstream_io-0.5.0/rust/src/models/writers/ipc/table_stream.rs +513 -0
  229. lightstream_io-0.5.0/rust/src/models/writers/json.rs +211 -0
  230. lightstream_io-0.5.0/rust/src/models/writers/lightstream.rs +165 -0
  231. lightstream_io-0.5.0/rust/src/models/writers/parallel/http.rs +200 -0
  232. lightstream_io-0.5.0/rust/src/models/writers/parallel/lightstream.rs +180 -0
  233. lightstream_io-0.5.0/rust/src/models/writers/parallel/quic.rs +167 -0
  234. lightstream_io-0.5.0/rust/src/models/writers/parallel/tcp.rs +171 -0
  235. lightstream_io-0.5.0/rust/src/models/writers/parquet.rs +813 -0
  236. lightstream_io-0.5.0/rust/src/models/writers/quic.rs +101 -0
  237. lightstream_io-0.5.0/rust/src/models/writers/stdio.rs +96 -0
  238. lightstream_io-0.5.0/rust/src/models/writers/tcp.rs +175 -0
  239. lightstream_io-0.5.0/rust/src/models/writers/uds.rs +119 -0
  240. lightstream_io-0.5.0/rust/src/models/writers/websocket.rs +184 -0
  241. lightstream_io-0.5.0/rust/src/models/writers/webtransport.rs +94 -0
  242. lightstream_io-0.5.0/rust/src/test_helpers.rs +511 -0
  243. lightstream_io-0.5.0/rust/src/traits/byte_stream.rs +52 -0
  244. lightstream_io-0.5.0/rust/src/traits/chunked_table_reader.rs +271 -0
  245. lightstream_io-0.5.0/rust/src/traits/chunked_table_writer.rs +196 -0
  246. lightstream_io-0.5.0/rust/src/traits/decoder.rs +49 -0
  247. lightstream_io-0.5.0/rust/src/traits/encoder.rs +35 -0
  248. lightstream_io-0.5.0/rust/src/traits/frame_decoder.rs +45 -0
  249. lightstream_io-0.5.0/rust/src/traits/frame_encoder.rs +51 -0
  250. lightstream_io-0.5.0/rust/src/traits/parallel_transport_reader.rs +53 -0
  251. lightstream_io-0.5.0/rust/src/traits/parallel_transport_writer.rs +50 -0
  252. lightstream_io-0.5.0/rust/src/traits/serialise.rs +36 -0
  253. lightstream_io-0.5.0/rust/src/traits/stream_buffer.rs +211 -0
  254. lightstream_io-0.5.0/rust/src/traits/transport.rs +57 -0
  255. lightstream_io-0.5.0/rust/src/traits/transport_reader.rs +55 -0
  256. lightstream_io-0.5.0/rust/src/traits/transport_writer.rs +45 -0
  257. lightstream_io-0.5.0/rust/src/utils.rs +156 -0
  258. lightstream_io-0.5.0/rust/tests/http_parallel_roundtrip.rs +170 -0
  259. lightstream_io-0.5.0/rust/tests/io_uring_roundtrip.rs +264 -0
  260. lightstream_io-0.5.0/rust/tests/ipc_roundtrip.rs +809 -0
  261. lightstream_io-0.5.0/rust/tests/json_roundtrip.rs +248 -0
  262. lightstream_io-0.5.0/rust/tests/lightstream_parallel_roundtrip.rs +172 -0
  263. lightstream_io-0.5.0/rust/tests/parquet_roundtrip.rs +270 -0
  264. lightstream_io-0.5.0/rust/tests/protocol_roundtrip.rs +766 -0
  265. lightstream_io-0.5.0/rust/tests/pyarrow_roundtrip.rs +497 -0
  266. lightstream_io-0.5.0/rust/tests/quic_roundtrip.rs +781 -0
  267. lightstream_io-0.5.0/rust/tests/stdio_roundtrip.rs +404 -0
  268. lightstream_io-0.5.0/rust/tests/tcp_parallel_roundtrip.rs +153 -0
  269. lightstream_io-0.5.0/rust/tests/tcp_roundtrip.rs +275 -0
  270. lightstream_io-0.5.0/rust/tests/test_column_projection.rs +363 -0
  271. lightstream_io-0.5.0/rust/tests/test_compression_api.rs +104 -0
  272. lightstream_io-0.5.0/rust/tests/test_compression_integration.rs +302 -0
  273. lightstream_io-0.5.0/rust/tests/test_compression_roundtrip.rs +631 -0
  274. lightstream_io-0.5.0/rust/tests/test_mmap_shared_buffers.rs +220 -0
  275. lightstream_io-0.5.0/rust/tests/transport_roundtrip.rs +666 -0
  276. lightstream_io-0.5.0/rust/tests/uds_roundtrip.rs +338 -0
  277. lightstream_io-0.5.0/rust/tests/websocket_roundtrip.rs +292 -0
  278. lightstream_io-0.5.0/rust/tests/webtransport_roundtrip.rs +361 -0
@@ -0,0 +1,268 @@
1
+ Metadata-Version: 2.4
2
+ Name: lightstream-io
3
+ Version: 0.5.0
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: Intended Audience :: Science/Research
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Rust
9
+ Classifier: Topic :: Scientific/Engineering
10
+ Classifier: Topic :: Software Development :: Libraries
11
+ Requires-Dist: minarrow>=0.16
12
+ Requires-Dist: pytest>=7.0 ; extra == 'dev'
13
+ Requires-Dist: pyarrow>=14.0 ; extra == 'dev'
14
+ Requires-Dist: polars>=1.0 ; extra == 'dev'
15
+ Requires-Dist: duckdb>=1.0 ; extra == 'dev'
16
+ Provides-Extra: dev
17
+ Summary: Streaming Arrow I/O for Python - files, sockets, and network transports with zero-copy minarrow interop.
18
+ Keywords: arrow,streaming,minarrow,ipc,parquet,quic
19
+ Home-Page: https://github.com/SpaceCell/lightstream
20
+ Author: Peter Bower
21
+ License-Expression: MPL-2.0
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
24
+ Project-URL: Homepage, https://github.com/SpaceCell/lightstream
25
+ Project-URL: Repository, https://github.com/SpaceCell/lightstream
26
+
27
+ # lightstream
28
+
29
+ Move Arrow tables between processes, services and storage from Python without adding a gRPC stack or writing transport-specific framing.
30
+
31
+ `lightstream` provides one streaming API across files, memory maps, sockets and network transports. Readers return [`minarrow`](https://github.com/pbower/minarrow) objects and implement the Arrow PyCapsule protocol, allowing PyArrow, Polars, DuckDB and other Arrow-compatible libraries to consume data **straight off the wire** without an intermediate conversion.
32
+
33
+ ## Installation
34
+
35
+ ```bash
36
+ pip install lightstream-io
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ Everything is `read` or `write`.
42
+
43
+ The URI selects the transport, `protocol` selects the wire framing, and file extensions select the storage format.
44
+
45
+ ```python
46
+ import lightstream as ls
47
+ ```
48
+
49
+ ### Files
50
+
51
+ Read Arrow IPC, Parquet, CSV and JSON through the same interface.
52
+
53
+ ```python
54
+ # Read an entire dataset.
55
+ table = ls.read("quotes.arrow").read_all()
56
+
57
+ # Stream batches without loading the complete dataset into memory.
58
+ for batch in ls.read("large.parquet"):
59
+ process(batch)
60
+
61
+ # Write any Arrow-compatible object.
62
+ with ls.write("output.parquet", compression="zstd") as writer:
63
+ writer.write(table)
64
+ ```
65
+
66
+ Arrow IPC readers use memory mapping and out-of-core routing where appropriate.
67
+
68
+ Readers yield `minarrow.Table` batches. `read_all()` returns a `Table` when the result is contiguous or a `ChunkedTable` when multiple chunks must be preserved.
69
+
70
+ ### Network transports
71
+
72
+ The same interface streams raw Arrow IPC over TCP, Unix domain sockets, WebSocket, HTTP, QUIC, WebTransport and standard I/O.
73
+
74
+ ```python
75
+ for batch in ls.read("tcp://feed.example.com:9000"):
76
+ process(batch)
77
+ ```
78
+
79
+ Supported URI schemes include:
80
+
81
+ | Transport | URI |
82
+ | --------------------- | ----------------------- |
83
+ | TCP | `tcp://host:port` |
84
+ | Unix domain socket | `uds:///path/to/socket` |
85
+ | WebSocket | `ws://host/path` |
86
+ | Secure WebSocket | `wss://host/path` |
87
+ | HTTP | `http://host/path` |
88
+ | HTTPS | `https://host/path` |
89
+ | QUIC | `quic://host:port` |
90
+ | WebTransport | `wt://host/path` |
91
+ | Standard input/output | `stdio://` |
92
+
93
+ ### Accepting connections
94
+
95
+ Either endpoint can accept the connection.
96
+
97
+ Set `accept=True` to bind the endpoint on first use and block until the connecting peer arrives.
98
+
99
+ ```python
100
+ writer = ls.write(
101
+ "uds:///tmp/feed.sock",
102
+ accept=True,
103
+ )
104
+
105
+ writer.write(table)
106
+ writer.close()
107
+ ```
108
+
109
+ The listener remains available for the lifetime of the process. Connections arriving while a serving loop is active wait in the listener backlog, allowing the accepting endpoint to operate as a persistent server.
110
+
111
+ ### TLS
112
+
113
+ QUIC and WebTransport include TLS at the protocol level. The accepting endpoint presents a PEM certificate and private key, while the connecting endpoint verifies the certificate using PEM roots.
114
+
115
+ ```python
116
+ writer = ls.write(
117
+ "quic://0.0.0.0:4433",
118
+ accept=True,
119
+ tls_cert="server.pem",
120
+ tls_key="server-key.pem",
121
+ )
122
+
123
+ for batch in ls.read(
124
+ "quic://feed.example.com:4433",
125
+ tls_ca="roots.pem",
126
+ ):
127
+ process(batch)
128
+ ```
129
+
130
+ Secure WebSocket and HTTPS transports use their corresponding TLS-enabled URI schemes.
131
+
132
+ ## Arrow interoperability
133
+
134
+ Every reader implements the Arrow PyCapsule stream protocol.
135
+
136
+ Arrow-compatible libraries can therefore consume a Lightstream reader directly.
137
+
138
+ ```python
139
+ import duckdb
140
+ import lightstream as ls
141
+
142
+ reader = ls.read("quotes.arrow")
143
+
144
+ result = duckdb.sql(
145
+ "SELECT SUM(qty) FROM reader"
146
+ )
147
+ ```
148
+
149
+ The same reader can be passed to libraries such as Polars without first converting its batches into Python objects.
150
+
151
+ ## Lightstream protocol
152
+
153
+ The Lightstream protocol multiplexes named Arrow tables and opaque messages over one connection.
154
+
155
+ Opaque payloads can carry formats such as Protobuf or MessagePack, while table channels retain their Arrow schema and batch representation.
156
+
157
+ ```python
158
+ reader = ls.read(
159
+ "uds:///tmp/feed.sock",
160
+ protocol="lightstream",
161
+ )
162
+
163
+ reader.register_table(
164
+ "quotes",
165
+ representative_table,
166
+ )
167
+ reader.register_message("health")
168
+
169
+ for frame in reader:
170
+ if frame.is_table():
171
+ on_quotes(frame.table)
172
+ else:
173
+ on_health(frame.payload)
174
+ ```
175
+
176
+ `frame.table` is a `minarrow.Table`. Message payloads are returned as `bytes`.
177
+
178
+ Both peers must register compatible channels before exchanging frames.
179
+
180
+ The protocol is transport-independent, so the same table and message definitions can be used over TCP, Unix domain sockets, WebSocket, HTTP, QUIC or WebTransport.
181
+
182
+ ## Standard I/O pipelines
183
+
184
+ The standard I/O transport can stream Arrow IPC or line-oriented text.
185
+
186
+ Set `format="csv"` to write CSV records or `format="json"` to write NDJSON. Text emitted by another process is decoded back into table batches on read.
187
+
188
+ This allows Unix tools, command-line programs and agents to participate directly in a table pipeline.
189
+
190
+ ```bash
191
+ python examples/run-example.py sed
192
+ python examples/run-example.py jq
193
+ python examples/run-example.py claude
194
+ python examples/run-example.py sql
195
+ python examples/run-example.py debug
196
+ ```
197
+
198
+ The pipeline examples demonstrate:
199
+
200
+ * `sed` rewriting rows in flight
201
+ * `jq` filtering NDJSON and returning CSV
202
+ * an agent diagnosing invalid batches
203
+ * rolling DuckDB SQL over a live stream
204
+ * `tail -f`-style table inspection and pretty-printing
205
+
206
+ ## Transport examples
207
+
208
+ Worked examples are provided under `examples/transport/`.
209
+
210
+ Each transport includes:
211
+
212
+ * a Python server
213
+ * a Rust server
214
+ * a Python client
215
+ * the same million-row input table
216
+
217
+ Use the example router to select the transport and backend:
218
+
219
+ ```bash
220
+ # Python backend over TCP.
221
+ python examples/run-example.py tcp
222
+
223
+ # Rust backend over QUIC.
224
+ python examples/run-example.py quic --rust
225
+ ```
226
+
227
+ Available transports are:
228
+
229
+ ```text
230
+ tcp
231
+ uds
232
+ ws
233
+ wss
234
+ http
235
+ https
236
+ quic
237
+ wt
238
+ stdio
239
+ ```
240
+
241
+ TLS examples generate a private root certificate and a server certificate for local execution.
242
+
243
+ ## Building from source
244
+
245
+ Lightstream currently requires the Rust nightly toolchain. The repository selects the required toolchain automatically through `rust-toolchain.toml`.
246
+
247
+ ```bash
248
+ pip install maturin
249
+ maturin develop
250
+ pytest tests/
251
+ ```
252
+
253
+ ## Licence
254
+
255
+ Copyright © 2025–2026 Peter Garfield Bower.
256
+
257
+ Licensed under the Mozilla Public License 2.0. See `LICENSE` for the standard terms.
258
+
259
+ See [MPL 2.0 FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/) if you are unfamiliar with this open-source license.
260
+
261
+ ## Affiliation notice
262
+
263
+ Lightstream is not affiliated with Apache Arrow or the Apache Software Foundation.
264
+
265
+ It implements public Arrow formats through Minarrow and interoperates with the Arrow ecosystem through the Arrow PyCapsule protocol.
266
+
267
+ `lightstream` is maintained by [SpaceCell](https://spacecell.com) and forms part of its open-source foundation for high-performance data computing.
268
+
@@ -0,0 +1,241 @@
1
+ # lightstream
2
+
3
+ Move Arrow tables between processes, services and storage from Python without adding a gRPC stack or writing transport-specific framing.
4
+
5
+ `lightstream` provides one streaming API across files, memory maps, sockets and network transports. Readers return [`minarrow`](https://github.com/pbower/minarrow) objects and implement the Arrow PyCapsule protocol, allowing PyArrow, Polars, DuckDB and other Arrow-compatible libraries to consume data **straight off the wire** without an intermediate conversion.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ pip install lightstream-io
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Everything is `read` or `write`.
16
+
17
+ The URI selects the transport, `protocol` selects the wire framing, and file extensions select the storage format.
18
+
19
+ ```python
20
+ import lightstream as ls
21
+ ```
22
+
23
+ ### Files
24
+
25
+ Read Arrow IPC, Parquet, CSV and JSON through the same interface.
26
+
27
+ ```python
28
+ # Read an entire dataset.
29
+ table = ls.read("quotes.arrow").read_all()
30
+
31
+ # Stream batches without loading the complete dataset into memory.
32
+ for batch in ls.read("large.parquet"):
33
+ process(batch)
34
+
35
+ # Write any Arrow-compatible object.
36
+ with ls.write("output.parquet", compression="zstd") as writer:
37
+ writer.write(table)
38
+ ```
39
+
40
+ Arrow IPC readers use memory mapping and out-of-core routing where appropriate.
41
+
42
+ Readers yield `minarrow.Table` batches. `read_all()` returns a `Table` when the result is contiguous or a `ChunkedTable` when multiple chunks must be preserved.
43
+
44
+ ### Network transports
45
+
46
+ The same interface streams raw Arrow IPC over TCP, Unix domain sockets, WebSocket, HTTP, QUIC, WebTransport and standard I/O.
47
+
48
+ ```python
49
+ for batch in ls.read("tcp://feed.example.com:9000"):
50
+ process(batch)
51
+ ```
52
+
53
+ Supported URI schemes include:
54
+
55
+ | Transport | URI |
56
+ | --------------------- | ----------------------- |
57
+ | TCP | `tcp://host:port` |
58
+ | Unix domain socket | `uds:///path/to/socket` |
59
+ | WebSocket | `ws://host/path` |
60
+ | Secure WebSocket | `wss://host/path` |
61
+ | HTTP | `http://host/path` |
62
+ | HTTPS | `https://host/path` |
63
+ | QUIC | `quic://host:port` |
64
+ | WebTransport | `wt://host/path` |
65
+ | Standard input/output | `stdio://` |
66
+
67
+ ### Accepting connections
68
+
69
+ Either endpoint can accept the connection.
70
+
71
+ Set `accept=True` to bind the endpoint on first use and block until the connecting peer arrives.
72
+
73
+ ```python
74
+ writer = ls.write(
75
+ "uds:///tmp/feed.sock",
76
+ accept=True,
77
+ )
78
+
79
+ writer.write(table)
80
+ writer.close()
81
+ ```
82
+
83
+ The listener remains available for the lifetime of the process. Connections arriving while a serving loop is active wait in the listener backlog, allowing the accepting endpoint to operate as a persistent server.
84
+
85
+ ### TLS
86
+
87
+ QUIC and WebTransport include TLS at the protocol level. The accepting endpoint presents a PEM certificate and private key, while the connecting endpoint verifies the certificate using PEM roots.
88
+
89
+ ```python
90
+ writer = ls.write(
91
+ "quic://0.0.0.0:4433",
92
+ accept=True,
93
+ tls_cert="server.pem",
94
+ tls_key="server-key.pem",
95
+ )
96
+
97
+ for batch in ls.read(
98
+ "quic://feed.example.com:4433",
99
+ tls_ca="roots.pem",
100
+ ):
101
+ process(batch)
102
+ ```
103
+
104
+ Secure WebSocket and HTTPS transports use their corresponding TLS-enabled URI schemes.
105
+
106
+ ## Arrow interoperability
107
+
108
+ Every reader implements the Arrow PyCapsule stream protocol.
109
+
110
+ Arrow-compatible libraries can therefore consume a Lightstream reader directly.
111
+
112
+ ```python
113
+ import duckdb
114
+ import lightstream as ls
115
+
116
+ reader = ls.read("quotes.arrow")
117
+
118
+ result = duckdb.sql(
119
+ "SELECT SUM(qty) FROM reader"
120
+ )
121
+ ```
122
+
123
+ The same reader can be passed to libraries such as Polars without first converting its batches into Python objects.
124
+
125
+ ## Lightstream protocol
126
+
127
+ The Lightstream protocol multiplexes named Arrow tables and opaque messages over one connection.
128
+
129
+ Opaque payloads can carry formats such as Protobuf or MessagePack, while table channels retain their Arrow schema and batch representation.
130
+
131
+ ```python
132
+ reader = ls.read(
133
+ "uds:///tmp/feed.sock",
134
+ protocol="lightstream",
135
+ )
136
+
137
+ reader.register_table(
138
+ "quotes",
139
+ representative_table,
140
+ )
141
+ reader.register_message("health")
142
+
143
+ for frame in reader:
144
+ if frame.is_table():
145
+ on_quotes(frame.table)
146
+ else:
147
+ on_health(frame.payload)
148
+ ```
149
+
150
+ `frame.table` is a `minarrow.Table`. Message payloads are returned as `bytes`.
151
+
152
+ Both peers must register compatible channels before exchanging frames.
153
+
154
+ The protocol is transport-independent, so the same table and message definitions can be used over TCP, Unix domain sockets, WebSocket, HTTP, QUIC or WebTransport.
155
+
156
+ ## Standard I/O pipelines
157
+
158
+ The standard I/O transport can stream Arrow IPC or line-oriented text.
159
+
160
+ Set `format="csv"` to write CSV records or `format="json"` to write NDJSON. Text emitted by another process is decoded back into table batches on read.
161
+
162
+ This allows Unix tools, command-line programs and agents to participate directly in a table pipeline.
163
+
164
+ ```bash
165
+ python examples/run-example.py sed
166
+ python examples/run-example.py jq
167
+ python examples/run-example.py claude
168
+ python examples/run-example.py sql
169
+ python examples/run-example.py debug
170
+ ```
171
+
172
+ The pipeline examples demonstrate:
173
+
174
+ * `sed` rewriting rows in flight
175
+ * `jq` filtering NDJSON and returning CSV
176
+ * an agent diagnosing invalid batches
177
+ * rolling DuckDB SQL over a live stream
178
+ * `tail -f`-style table inspection and pretty-printing
179
+
180
+ ## Transport examples
181
+
182
+ Worked examples are provided under `examples/transport/`.
183
+
184
+ Each transport includes:
185
+
186
+ * a Python server
187
+ * a Rust server
188
+ * a Python client
189
+ * the same million-row input table
190
+
191
+ Use the example router to select the transport and backend:
192
+
193
+ ```bash
194
+ # Python backend over TCP.
195
+ python examples/run-example.py tcp
196
+
197
+ # Rust backend over QUIC.
198
+ python examples/run-example.py quic --rust
199
+ ```
200
+
201
+ Available transports are:
202
+
203
+ ```text
204
+ tcp
205
+ uds
206
+ ws
207
+ wss
208
+ http
209
+ https
210
+ quic
211
+ wt
212
+ stdio
213
+ ```
214
+
215
+ TLS examples generate a private root certificate and a server certificate for local execution.
216
+
217
+ ## Building from source
218
+
219
+ Lightstream currently requires the Rust nightly toolchain. The repository selects the required toolchain automatically through `rust-toolchain.toml`.
220
+
221
+ ```bash
222
+ pip install maturin
223
+ maturin develop
224
+ pytest tests/
225
+ ```
226
+
227
+ ## Licence
228
+
229
+ Copyright © 2025–2026 Peter Garfield Bower.
230
+
231
+ Licensed under the Mozilla Public License 2.0. See `LICENSE` for the standard terms.
232
+
233
+ See [MPL 2.0 FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/) if you are unfamiliar with this open-source license.
234
+
235
+ ## Affiliation notice
236
+
237
+ Lightstream is not affiliated with Apache Arrow or the Apache Software Foundation.
238
+
239
+ It implements public Arrow formats through Minarrow and interoperates with the Arrow ecosystem through the Arrow PyCapsule protocol.
240
+
241
+ `lightstream` is maintained by [SpaceCell](https://spacecell.com) and forms part of its open-source foundation for high-performance data computing.
@@ -0,0 +1,35 @@
1
+ [build-system]
2
+ requires = ["maturin>=1.0,<2.0"]
3
+ build-backend = "maturin"
4
+
5
+ [project]
6
+ name = "lightstream-io"
7
+ version = "0.5.0"
8
+ description = "Streaming Arrow I/O for Python - files, sockets, and network transports with zero-copy minarrow interop."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = "MPL-2.0"
12
+ authors = [{ name = "Peter Bower" }]
13
+ keywords = ["arrow", "streaming", "minarrow", "ipc", "parquet", "quic"]
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "Intended Audience :: Science/Research",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Rust",
20
+ "Topic :: Scientific/Engineering",
21
+ "Topic :: Software Development :: Libraries",
22
+ ]
23
+ dependencies = ["minarrow>=0.16"]
24
+
25
+ [project.urls]
26
+ Homepage = "https://github.com/SpaceCell/lightstream"
27
+ Repository = "https://github.com/SpaceCell/lightstream"
28
+
29
+ [project.optional-dependencies]
30
+ dev = ["pytest>=7.0", "pyarrow>=14.0", "polars>=1.0", "duckdb>=1.0"]
31
+
32
+ [tool.maturin]
33
+ features = ["pyo3/extension-module"]
34
+ module-name = "lightstream"
35
+ manifest-path = "python/Cargo.toml"