{"id":455,"library":"toml","title":"TOML","description":"A Python library for parsing and creating TOML (Tom's Obvious, Minimal Language) files. Current version: 0.10.2. Maintained with regular updates.","status":"active","version":"0.10.2","language":"python","source_language":"en","source_url":"https://github.com/uiri/toml","tags":["TOML","configuration","parsing","Python"],"install":[{"cmd":"pip install toml","lang":"bash","label":"Install TOML"}],"dependencies":[],"imports":[{"wrong":"import toml","symbol":"loads","correct":"from toml import loads"}],"quickstart":{"code":"import toml\n\ntoml_string = '''\n# This is a TOML document.\n\ntitle = \"TOML Example\"\n\n[owner]\nname = \"Tom Preston-Werner\"\ndob = 1979-05-27T07:32:00-08:00 # First class dates\n\n[database]\nserver = \"192.168.1.1\"\nports = [ 8001, 8001, 8002 ]\nconnection_max = 5000\nenabled = true\n\n[servers]\n\n  # Indentation (tabs and/or spaces) is allowed but not required\n  [servers.alpha]\nip = \"10.0.0.1\"\ndc = \"eqdc10\"\n\n  [servers.beta]\nip = \"10.0.0.2\"\ndc = \"eqdc10\"\n\n[clients]\ndata = [ [\"gamma\", \"delta\"], [1, 2] ]\n\n# Line breaks are OK when inside arrays\nhosts = [\n  \"alpha\",\n  \"omega\"\n]\n'''\n\nparsed_toml = toml.loads(toml_string)\n\nnew_toml_string = toml.dumps(parsed_toml)\nprint(new_toml_string)","lang":"python","description":"A comprehensive example demonstrating parsing and generating TOML data using the 'toml' library."},"warnings":[{"fix":"Replace 'load' with 'loads' for strings and 'load' for file objects.","message":"In version 0.10.0, the 'load' function was removed. Use 'loads' for strings and 'load' for file objects.","severity":"breaking","affected_versions":">=0.10.0"},{"fix":"Always import 'toml' at the beginning of your script.","message":"Ensure 'toml' is imported before using its functions like 'loads', 'dumps', and 'dump'.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.10.2':18 'configur':24 'creat':8 'current':16 'file':15 'languag':14 'librari':4 'maintain':19 'minim':13 'obvious':12 'pars':6,25 'python':3,26 'regular':21 'tom':10 'toml':1,9,23 'updat':22 'version':17","created_at":"2026-03-28T12:03:19.926311+00:00","updated_at":"2026-04-16T23:01:03.806379+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":100,"quickstart_score":80,"quickstart_tag":"verified","pypi_latest":"0.10.2","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/uiri/toml","docs":null,"changelog":null,"pypi":"https://pypi.org/project/toml/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-08-27","next_check":"2026-07-30","install_tag":"verified"}}