Language APIs

August 29, 2026 ยท View on GitHub

The cross language naming table (Rust, Python, Julia, C ABI) lives in the powerio repository: docs/src/languages.md.

Julia-specific notes:

  • Julia adds parse_bytes(io; format=...) because multiple dispatch is the natural way to express IO input.
  • Julia does not use convert / convert! for file format conversion. In Julia, Base.convert means type conversion and ! marks mutation; PowerIO returns new values.

The ABI v6 vocabulary

The stored module and DC data surfaces spell one vocabulary in every language. The Julia names below are the same words the Rust DcNetworkData fields, the Python dc_data dictionary keys, and the C pio_dc_data_* accessors use, and the susceptance formula names (series_susceptance, tap_adjusted_reactance, reactance_only) are shared verbatim.

JuliaCPython
parse_file / write_jsonpio_parse_file / pio_module_write_jsonpowerio.parse / PioModule.to_json
kindpio_module_kindPioModule.kind
state_inventory / select_statepio_module_state_inventory_json / pio_module_export_state.state_inventory() / .export_state()
dc_datapio_dc_data_buildBalancedNetwork.dc_data
susceptancepio_dc_data_susceptancedata["susceptance"]
from_indices / to_indicespio_dc_data_from_indices / ..._to_indicesdata["from_indices"] / data["to_indices"]
row_ids / bus_idspio_dc_data_row_ids / ..._bus_idsdata["row_ids"] / data["bus_ids"]
omittedpio_dc_data_omitted_ids + ..._omitted_reasonsdata["omitted_ids"] + data["omitted_reasons"]