Python Library for Tom's Obvious, Minimal Language
Project description
Original repository: https://github.com/uiri/toml
See also https://github.com/mojombo/toml
Python module which parses and emits TOML.
Released under the MIT license.
Passes https://github.com/BurntSushi/toml-test
See http://j.xqz.ca/toml-status for up to date test results.
Current Version of the Specification
QUICK GUIDE
pip install toml
toml.loads — takes a string to be parsed as toml and returns the corresponding dictionary
toml.dumps — takes a dictionary and returns a string which is the contents of the corresponding toml file.
There are other functions which I use to dump and load various fragments of toml but dumps and loads will cover most usage.
Example usage:
import toml
with open("conf.toml") as conffile:
config = toml.loads(conffile.read())
# do stuff with config here
. . .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file toml-0.8.2.tar.gz
.
File metadata
- Download URL: toml-0.8.2.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1260e1b94ca934ab48229720a88ce71910c886e136e209b8d76a83528c56e499 |
|
MD5 | 9aecbcba36dcdaba69523c7e074a06ab |
|
BLAKE2b-256 | 92f4559c5dfe5755c5730ba18cb8c8f06c49789d9e1880219f9565b6f1352acf |