Skip to main content

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

https://github.com/mojombo/toml/blob/v0.4.0/README.md

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toml-0.9.1.tar.gz (6.8 kB view details)

Uploaded Source

File details

Details for the file toml-0.9.1.tar.gz.

File metadata

  • Download URL: toml-0.9.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for toml-0.9.1.tar.gz
Algorithm Hash digest
SHA256 e835834f1de5c60657e588a4cc48544945e03569a3d9f8b489436abb987840cf
MD5 06a5f56f3db07a459ac9d6812d051530
BLAKE2b-256 5c4423bda89772ea8da0c4561637b6694abd1d21805e107bc324e66f4b54cdb3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page