Metadata-Version: 2.1
Name: crudtoml
Version: 0.1.1
Summary: Perform CRUD operations on TOML files.
Keywords: TOML
Author-email: Edward Knight <edw@rdknig.ht>
Requires-Python: ~= 3.10
Description-Content-Type: text/markdown
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: File Formats
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Dist: tomlkit ~= 0.8
Project-URL: Home, https://github.com/Edward-Knight/crudtoml

# [crudtoml](https://github.com/Edward-Knight/crudtoml)

[![PyPI - Status](https://img.shields.io/pypi/status/crudtoml)](https://pypi.org/project/crudtoml/)
[![PyPI - License](https://img.shields.io/pypi/l/crudtoml)](https://pypi.org/project/crudtoml/)
[![PyPI - Latest Project Version](https://img.shields.io/pypi/v/crudtoml)](https://pypi.org/project/crudtoml/)

Perform CRUD operations on TOML files.


## Features

* Style-preserving edits
* Supports indexing into arrays
* Write back to input file with `-i`
* "Shell-compatible" output à la `jq` with `-r`


## Examples

```shell
$ echo -e '[project]\nname = "crudtoml"' | tee test.toml
[project]
name = "crudtoml"
```

### Create!

```shell
$ crudtoml test.toml create project dob 2023-05-23
[project]
name = "crudtoml"
dob = 2023-06-23
```

### Read!

```shell
$ crudtoml test.toml read project name
"crudtoml"
```

### Update!

```shell
$ crudtoml test.toml update project name '"crudini"'
[project]
name = "crudini"
```

### Delete!

```shell
$ crudtoml test.toml delete project name
[project]
```

