Better TOML
libs -> tomlkit
for style, tomli(-w)
for speed
#496
Labels
accounting
prolly positioning: the accounting of "what/when (is) owned"
clearing
auction and mm tech: EMS, OMS, algo-trading
config
ledger
trade, accounts and other user focal event history tracking, management and storage
perf
efficiency and latency optimization
Since we already had to roll our own based on writing a particular
styled
.clears
table to thepps.toml
file, this is a task tochoose the best (combo of) lib(s).
Here's the verbatim bullet-task breakout from #345:
after much pain and anguish getting
the
toml
encoder to output things sanely, i think it's just worthwriting or switching to a super fast custom encoder that writes
adhoc-ly in the format we want for positions entries in
pps.toml
,the reader-writer separation is already what
tomli
does (the fastest pure py reader soon to land in the stdlib) andthen we can just drop
toml
outright and worry about getting a general encoder later.support better indentation
per broker-account for better readability,
indented tables per broker-account would
be super nice if possible
tomlkit
below which supports this -> https://github.com/pikers/tomlkit/blob/writing_docs_tweaks/tomlkit/items.py#L1644Array.multiline()
Support
Decimal
andMutableMapping
codecs, add a multiline-Array
indent control python-poetry/tomlkit#294Turns out there's been a bunch of project updates in the space 🙏🏼,
tomlkit
: from thepoetry
/pendulum
auth:https://github.com/sdispater/tomlkit and is based on a
rust
libDecimal
input support: SupportDecimal
serialization? python-poetry/tomlkit#288bidict
input support: Supportbidict
inputs? python-poetry/tomlkit#289msgspec.toml
now exists :party: which means we can natively renderour msgs and structs easily!
tomli(-w)
underneath so using that probably makes the mostsense for our speed solution.
a list of other alt libs that we prolly won't use but figured might as
well put them here just in case:
pytomlpp
c++ wrapped parser: https://bobfang1992.github.io/pytomlpp/pytomlpp.htmltoml-w
, stdlib'stoml
sibling writer lib: https://github.com/hukkin/tomli-w#does-tomli-w-support-writing-documents-with-comments-or-custom-whitespaceDecimal
support which i don't think is intomlkit
: https://github.com/hukkin/tomli#construct-decimaldecimals-from-toml-floatsThe text was updated successfully, but these errors were encountered: