Metadata-Version: 2.4
Name: tomledit
Version: 0.1.1
Classifier: License :: OSI Approved :: Apache Software License
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Summary: Format-preserving TOML parser
Keywords: encoding,toml
Author: David Hotham
License-Expression: Apache-2.0 OR MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Repository, https://github.com/dimbleby/tomledit

# tomledit

A format-preserving TOML editor for Python, powered by Rust's
[toml_edit](https://docs.rs/toml_edit) via [pyo3](https://pyo3.rs).

Parse a TOML document, modify it like a native Python dict, and write it back
— comments, whitespace, and ordering are preserved.

## Quick start

```python
from tomledit import Document

doc = Document.parse(open("pyproject.toml").read())

doc["project"]["version"] = "2.0.0"
doc["project"]["keywords"].append("new-keyword")
del doc["project"]["optional-dependencies"]

open("pyproject.toml", "w").write(str(doc))
```

