gecko-dev/servo/python/toml
Bogdan Cuza 5e266ea18c servo: Merge #6648 - Make tidy check for "*" in toml files (from boghison:tidytoml); r=jdm
This checks every .toml file for an asterisk and prints an error if found.

Source-Repo: https://github.com/servo/servo
Source-Revision: 58e9bc6583b6ebbeb27e3b28a6b271ee48cd695a
2015-07-20 14:43:05 -06:00
..
LICENSE servo: Merge #3230 - Cargoify servo (from servo:cargoify) 2014-09-09 08:18:18 -06:00
PKG-INFO servo: Merge #3230 - Cargoify servo (from servo:cargoify) 2014-09-09 08:18:18 -06:00
README.rst servo: Merge #3230 - Cargoify servo (from servo:cargoify) 2014-09-09 08:18:18 -06:00
setup.py servo: Merge #3230 - Cargoify servo (from servo:cargoify) 2014-09-09 08:18:18 -06:00
toml.py servo: Merge #6648 - Make tidy check for "*" in toml files (from boghison:tidytoml); r=jdm 2015-07-20 14:43:05 -06:00

README.rst

TOML
====

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.2.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:

.. code:: python

  import toml

  with open("conf.toml") as conffile:
      config = toml.loads(conffile.read())
  # do stuff with config here
  . . .