Problem
sdks/python/src/lib.rs and historical_methods.rs have no FLATFILES bindings. Python users on the option-flatfile bundle have no way to pull a daily blob from the SDK.
Proposed solution
Add async methods on ThetaDataDx:
await tdx.flatfile_request(sec_type, req_type, date, output_path, format)
await tdx.flatfile_request_decoded(sec_type, req_type, date) — returns a list of typed row dicts. Add an Arrow path (to_arrow()) consistent with the existing tick story so Pandas/Polars work without round-tripping through CSV.
await tdx.flatfile_request_raw(sec_type, req_type, date, output_path)
- The 9 convenience methods.
Expose SecType, ReqType, FlatFileFormat enums in enums_generated.rs (PyO3 enum). Type-stub them in the .pyi file.
Impact
Python is the largest installed base. This is the binding most users will reach for first.
Problem
sdks/python/src/lib.rsandhistorical_methods.rshave no FLATFILES bindings. Python users on the option-flatfile bundle have no way to pull a daily blob from the SDK.Proposed solution
Add async methods on
ThetaDataDx:await tdx.flatfile_request(sec_type, req_type, date, output_path, format)await tdx.flatfile_request_decoded(sec_type, req_type, date)— returns a list of typed row dicts. Add an Arrow path (to_arrow()) consistent with the existing tick story so Pandas/Polars work without round-tripping through CSV.await tdx.flatfile_request_raw(sec_type, req_type, date, output_path)Expose
SecType,ReqType,FlatFileFormatenums inenums_generated.rs(PyO3 enum). Type-stub them in the.pyifile.Impact
Python is the largest installed base. This is the binding most users will reach for first.