# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-toml VERSION= 0.10.2 KEYWORDS= python VARIANTS= v11 v12 SDESC[v11]= Tom's Obvious, Minimal Language (3.11) SDESC[v12]= Tom's Obvious, Minimal Language (3.12) HOMEPAGE= https://github.com/uiri/toml CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/44/6f/7120676b6d73228c96e17f1f794d8ab046fc910d781c8d151120c3f1569e DISTFILE[1]= toml-0.10.2-py2.py3-none-any.whl:main DF_INDEX= 1 SPKGS[v11]= single SPKGS[v12]= single OPTIONS_AVAILABLE= PY311 PY312 OPTIONS_STANDARD= none VOPTS[v11]= PY311=ON PY312=OFF VOPTS[v12]= PY311=OFF PY312=ON DISTNAME= toml-0.10.2.dist-info GENERATED= yes [PY311].USES_ON= python:v11,wheel [PY312].USES_ON= python:v12,wheel [FILE:1993:descriptions/desc.single] **** TOML **** A Python library for parsing and creating [TOML]. The module passes [the TOML test suite]. See also: * [The TOML Standard] * [The currently supported TOML specification] Installation ============ To install the latest release on [PyPI], simply run: :: pip install toml Or to install the latest development version, run: :: git clone https://github.com/uiri/toml.git cd toml python setup.py install Quick Tutorial ============== *toml.loads* takes in a string containing standard TOML-formatted data and returns a dictionary containing the parsed data. .. code:: pycon >>> import toml >>> toml_string = """ ... # This is a TOML document. ... ... title = "TOML Example" ... ... [owner] ... name = "Tom Preston-Werner" ... dob = 1979-05-27T07:32:00-08:00 # First class dates ... ... [database] ... server = "192.168.1.1" ... ports = [ 8001, 8001, 8002] ... connection_max = 5000 ... enabled = true ... ... [servers] ... ... # Indentation (tabs and/or spaces) is allowed but not required ... [servers.alpha] ... ip = "10.0.0.1" ... dc = "eqdc10" ... ... [servers.beta] ... ip = "10.0.0.2" ... dc = "eqdc10" ... ... [clients] ... data = [ ["gamma", "delta"], [1, 2]] ... ... # Line breaks are OK when inside arrays ... hosts = [ ... "alpha", ... "omega" ...] ... """ >>> parsed_toml = toml.loads(toml_string) *toml.dumps* takes a dictionary and returns a string containing the corresponding TOML-formatted data. .. code:: pycon >>> new_toml_string = toml.dumps(parsed_toml) >>> print(new_toml_string) title = "TOML Example" [owner] name = "Tom Preston-Werner" dob = 1979-05-27T07:32:00Z [database] server = "192.168.1.1" ports = [ 8001, 8001, 8002,] connection_max = 5000 enabled = true [clients] data = [ [ "gamma", "delta",], [ 1, 2,],] hosts = [ "alpha", "omega",] [servers.alpha] ip = "10.0.0.1" dc = "eqdc10" [servers.beta] [FILE:111:distinfo] 806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b 16588 toml-0.10.2-py2.py3-none-any.whl