I needed a quick way to parse and emit logfmt key-value lines for a logging side project last weekend. Writing this took me about three hours and cost zero dollars, mostly because I refused to pull in heavy third-party packages just to split strings. It handles the annoying edge cases like nested quoting without adding extra baggage.
The whole thing relies entirely on the Python standard library. You do not have to install any external services, SDKs, or weird dependencies. Just drop the file in your repo and run it.
logfmt.py
I kept the tests right next to the implementation file. Run them locally to see exactly how it handles the weird formatting quirks in practice.