{"id":13496529,"url":"https://github.com/uiri/toml","last_synced_at":"2025-12-11T22:49:51.831Z","repository":{"id":7095754,"uuid":"8387179","full_name":"uiri/toml","owner":"uiri","description":"Python lib for TOML","archived":false,"fork":false,"pushed_at":"2024-06-26T18:59:56.000Z","size":356,"stargazers_count":1135,"open_issues_count":133,"forks_count":194,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-12-05T12:54:48.103Z","etag":null,"topics":["hacktoberfest","hacktoberfest2020"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uiri.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-02-24T06:07:30.000Z","updated_at":"2025-12-03T15:55:52.000Z","dependencies_parsed_at":"2024-02-26T01:49:39.232Z","dependency_job_id":"6c73a52c-34e4-4ec7-8294-ed989b64bfdd","html_url":"https://github.com/uiri/toml","commit_stats":{"total_commits":322,"total_committers":60,"mean_commits":5.366666666666666,"dds":0.3788819875776398,"last_synced_commit":"65bab7582ce14c55cdeec2244c65ea23039c9e6f"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/uiri/toml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiri%2Ftoml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiri%2Ftoml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiri%2Ftoml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiri%2Ftoml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uiri","download_url":"https://codeload.github.com/uiri/toml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uiri%2Ftoml/sbom","scorecard":{"id":907583,"data":{"date":"2025-08-11","repo":{"name":"github.com/uiri/toml","commit":"65bab7582ce14c55cdeec2244c65ea23039c9e6f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":7,"reason":"Found 20/26 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: OSSFuzz integration found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/uiri/toml/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/uiri/toml/ci.yaml/master?enable=pin","Warn: containerImage not pinned by hash: dev.Dockerfile:3: pin your Docker image by updating ubuntu:22.04 to ubuntu:22.04@sha256:1aa979d85661c488ce030ac292876cf6ed04535d3a237e49f61542d8e5de5ae0","Warn: downloadThenRun not pinned by hash: dev.Dockerfile:10-25","Warn: pipCommand not pinned by hash: dev.Dockerfile:10-25","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T17:53:12.630Z","repository_id":7095754,"created_at":"2025-08-24T17:53:12.631Z","updated_at":"2025-08-24T17:53:12.631Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27526122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-05T02:00:07.920Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","hacktoberfest2020"],"created_at":"2024-07-31T19:01:50.462Z","updated_at":"2025-12-11T22:49:51.811Z","avatar_url":"https://github.com/uiri.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"****\nTOML\n****\n\n.. image:: https://img.shields.io/pypi/v/toml\n    :target: https://pypi.org/project/toml/\n\n.. image:: https://travis-ci.org/uiri/toml.svg?branch=master\n    :target: https://travis-ci.org/uiri/toml\n\n.. image:: https://img.shields.io/pypi/pyversions/toml.svg\n    :target: https://pypi.org/project/toml/\n\n\nA Python library for parsing and creating `TOML \u003chttps://en.wikipedia.org/wiki/TOML\u003e`_.\n\nThe module passes `the TOML test suite \u003chttps://github.com/toml-lang/toml-test\u003e`_.\n\nSee also:\n\n* `The TOML Standard \u003chttps://github.com/toml-lang/toml\u003e`_\n* `The currently supported TOML specification \u003chttps://github.com/toml-lang/toml/blob/v0.5.0/README.md\u003e`_\n\nInstallation\n============\n\nTo install the latest release on `PyPI \u003chttps://pypi.org/project/toml/\u003e`_,\nsimply run:\n\n::\n\n  pip install toml\n\nOr to install the latest development version, run:\n\n::\n\n  git clone https://github.com/uiri/toml.git\n  cd toml\n  python setup.py install\n\nQuick Tutorial\n==============\n\n*toml.loads* takes in a string containing standard TOML-formatted data and\nreturns a dictionary containing the parsed data.\n\n.. code:: pycon\n\n  \u003e\u003e\u003e import toml\n  \u003e\u003e\u003e toml_string = \"\"\"\n  ... # This is a TOML document.\n  ...\n  ... title = \"TOML Example\"\n  ...\n  ... [owner]\n  ... name = \"Tom Preston-Werner\"\n  ... dob = 1979-05-27T07:32:00-08:00 # First class dates\n  ...\n  ... [database]\n  ... server = \"192.168.1.1\"\n  ... ports = [ 8001, 8001, 8002 ]\n  ... connection_max = 5000\n  ... enabled = true\n  ...\n  ... [servers]\n  ...\n  ...   # Indentation (tabs and/or spaces) is allowed but not required\n  ...   [servers.alpha]\n  ...   ip = \"10.0.0.1\"\n  ...   dc = \"eqdc10\"\n  ...\n  ...   [servers.beta]\n  ...   ip = \"10.0.0.2\"\n  ...   dc = \"eqdc10\"\n  ...\n  ... [clients]\n  ... data = [ [\"gamma\", \"delta\"], [1, 2] ]\n  ...\n  ... # Line breaks are OK when inside arrays\n  ... hosts = [\n  ...   \"alpha\",\n  ...   \"omega\"\n  ... ]\n  ... \"\"\"\n  \u003e\u003e\u003e parsed_toml = toml.loads(toml_string)\n\n\n*toml.dumps* takes a dictionary and returns a string containing the\ncorresponding TOML-formatted data.\n\n.. code:: pycon\n\n  \u003e\u003e\u003e new_toml_string = toml.dumps(parsed_toml)\n  \u003e\u003e\u003e print(new_toml_string)\n  title = \"TOML Example\"\n  [owner]\n  name = \"Tom Preston-Werner\"\n  dob = 1979-05-27T07:32:00Z\n  [database]\n  server = \"192.168.1.1\"\n  ports = [ 8001, 8001, 8002,]\n  connection_max = 5000\n  enabled = true\n  [clients]\n  data = [ [ \"gamma\", \"delta\",], [ 1, 2,],]\n  hosts = [ \"alpha\", \"omega\",]\n  [servers.alpha]\n  ip = \"10.0.0.1\"\n  dc = \"eqdc10\"\n  [servers.beta]\n  ip = \"10.0.0.2\"\n  dc = \"eqdc10\"\n\n*toml.dump* takes a dictionary and a file descriptor and returns a string containing the\ncorresponding TOML-formatted data.\n\n.. code:: pycon\n\n  \u003e\u003e\u003e with open('new_toml_file.toml', 'w') as f:\n  ...     new_toml_string = toml.dump(parsed_toml, f)\n  \u003e\u003e\u003e print(new_toml_string)\n  title = \"TOML Example\"\n  [owner]\n  name = \"Tom Preston-Werner\"\n  dob = 1979-05-27T07:32:00Z\n  [database]\n  server = \"192.168.1.1\"\n  ports = [ 8001, 8001, 8002,]\n  connection_max = 5000\n  enabled = true\n  [clients]\n  data = [ [ \"gamma\", \"delta\",], [ 1, 2,],]\n  hosts = [ \"alpha\", \"omega\",]\n  [servers.alpha]\n  ip = \"10.0.0.1\"\n  dc = \"eqdc10\"\n  [servers.beta]\n  ip = \"10.0.0.2\"\n  dc = \"eqdc10\"\n\nFor more functions, view the API Reference below.\n\nNote\n----\n\nFor Numpy users, by default the data types ``np.floatX`` will not be translated to floats by toml, but will instead be encoded as strings. To get around this, specify the ``TomlNumpyEncoder`` when saving your data.\n\n.. code:: pycon\n\n  \u003e\u003e\u003e import toml\n  \u003e\u003e\u003e import numpy as np\n  \u003e\u003e\u003e a = np.arange(0, 10, dtype=np.double)\n  \u003e\u003e\u003e output = {'a': a}\n  \u003e\u003e\u003e toml.dumps(output)\n  'a = [ \"0.0\", \"1.0\", \"2.0\", \"3.0\", \"4.0\", \"5.0\", \"6.0\", \"7.0\", \"8.0\", \"9.0\",]\\n'\n  \u003e\u003e\u003e toml.dumps(output, encoder=toml.TomlNumpyEncoder())\n  'a = [ 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0,]\\n'\n\nAPI Reference\n=============\n\n``toml.load(f, _dict=dict)``\n  Parse a file or a list of files as TOML and return a dictionary.\n\n  :Args:\n    * ``f``: A path to a file, list of filepaths (to be read into single\n      object) or a file descriptor\n    * ``_dict``: The class of the dictionary object to be returned\n\n  :Returns:\n    A dictionary (or object ``_dict``) containing parsed TOML data\n\n  :Raises:\n    * ``TypeError``: When ``f`` is an invalid type or is a list containing\n      invalid types\n    * ``TomlDecodeError``: When an error occurs while decoding the file(s)\n\n``toml.loads(s, _dict=dict)``\n  Parse a TOML-formatted string to a dictionary.\n\n  :Args:\n    * ``s``: The TOML-formatted string to be parsed\n    * ``_dict``: Specifies the class of the returned toml dictionary\n\n  :Returns:\n    A dictionary (or object ``_dict``) containing parsed TOML data\n\n  :Raises:\n    * ``TypeError``: When a non-string object is passed\n    * ``TomlDecodeError``: When an error occurs while decoding the\n      TOML-formatted string\n\n``toml.dump(o, f, encoder=None)``\n  Write a dictionary to a file containing TOML-formatted data\n\n  :Args:\n    * ``o``: An object to be converted into TOML\n    * ``f``: A File descriptor where the TOML-formatted output should be stored\n    * ``encoder``: An instance of ``TomlEncoder`` (or subclass) for encoding the object. If ``None``, will default to ``TomlEncoder``\n\n  :Returns:\n    A string containing the TOML-formatted data corresponding to object ``o``\n\n  :Raises:\n    * ``TypeError``: When anything other than file descriptor is passed\n\n``toml.dumps(o, encoder=None)``\n  Create a TOML-formatted string from an input object\n\n  :Args:\n    * ``o``: An object to be converted into TOML\n    * ``encoder``: An instance of ``TomlEncoder`` (or subclass) for encoding the object. If ``None``, will default to ``TomlEncoder``\n\n  :Returns:\n    A string containing the TOML-formatted data corresponding to object ``o``\n\n\n\nLicensing\n=========\n\nThis project is released under the terms of the MIT Open Source License. View\n*LICENSE.txt* for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuiri%2Ftoml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuiri%2Ftoml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuiri%2Ftoml/lists"}