【文件属性】:
文件名称:python-consistent-toml:适用于Python的一致TOML
文件大小:23KB
文件格式:ZIP
更新时间:2021-04-30 10:16:53
Python
适用于Python的一致TOML
一个Python模块,用于更新文件中的数据而不会弄乱它们的格式。 这是通过在内部将解析/构造的TOML数据结构保留为词法标记并直接对标记执行数据操作来实现的。
安装
pip install --upgrade contoml
用法
>> > import contoml
>> > toml_file = contoml . load ( 'sample.toml' )
# The anonymous table is accessible using the empty string key on the TOML file
>> > toml_file [ '' ][ 'title' ]
'TOML Example'
# You can modify table values in-place
>> > toml_file [ 'fruit' ][ 1
【文件预览】:
python-consistent-toml-master
----.gitignore(717B)
----setup.cfg(69B)
----dateless_sample.toml(2KB)
----README.md(1KB)
----contoml()
--------_version.py(19B)
--------__init__.py(1KB)
--------file()
----test_contoml.py(6KB)
----LICENSE(1KB)
----dateless_sample.json(2KB)
----sample-prettified.toml(1KB)
----sample.toml(2KB)
----MANIFEST.in(31B)
----dateless_sample-broken.toml(2KB)
----setup.py(606B)
----.travis.yml(454B)
----sample.json(2KB)