API reference
The thrift package, from thrift 0.1.3, as published on mojoshelf (commit 21cdbce67d22), by mojo doc from Mojo 1.2.0.
Source.
thrift.mojo — Apache Thrift serialization in pure Mojo.
Part of magmalake: data lake building blocks in Mojo.
No RPC, no IDL compiler at run time — just the two wire protocols that matter for reading columnar files, plus hand-checkable Mojo structs for the Apache Parquet metadata schema.
from thrift import TCompactProtocolReader, T_STOP
var r = TCompactProtocolReader(Span(footer_bytes))
r.read_struct_begin()
while True:
var head = r.read_field_begin()
if head[0] == T_STOP:
break
r.skip(head[0])
r.read_field_end()
r.read_struct_end()
Everything here is dependency-free: the standard library and nothing else.
Modules
-
thrift.parquet_footerLocating and decoding the Parquet footer and page headers. 7 functions -
thrift.parquet_typesThe Apache Parquet metadata schema as Mojo structs. 69 structs -
thrift.protocolApache Thrift wire protocols in pure Mojo — serialization only, no RPC. 4 structs · 2 traits · 6 functions