{"id":18438668,"url":"https://github.com/seapagan/simple-toml-settings","last_synced_at":"2026-02-28T14:06:05.929Z","repository":{"id":198752041,"uuid":"701467387","full_name":"seapagan/simple-toml-settings","owner":"seapagan","description":"A Python library to save your settings in a TOML file.","archived":false,"fork":false,"pushed_at":"2024-10-21T17:15:46.000Z","size":2146,"stargazers_count":2,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-21T19:25:12.441Z","etag":null,"topics":["python","python-configuration","settings","toml","toml-config"],"latest_commit_sha":null,"homepage":"http://toml-settings.grantramsay.dev/","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/seapagan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"seapagan","patreon":null,"open_collective":null,"ko_fi":"grantramsay","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.buymeacoffee.com/seapagan"]}},"created_at":"2023-10-06T17:40:38.000Z","updated_at":"2024-08-22T10:08:11.000Z","dependencies_parsed_at":"2023-10-16T20:42:33.784Z","dependency_job_id":"30944be5-338e-4952-adfb-90c4fed14cba","html_url":"https://github.com/seapagan/simple-toml-settings","commit_stats":null,"previous_names":["seapagan/simple-toml-settings"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seapagan%2Fsimple-toml-settings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seapagan%2Fsimple-toml-settings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seapagan%2Fsimple-toml-settings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seapagan%2Fsimple-toml-settings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seapagan","download_url":"https://codeload.github.com/seapagan/simple-toml-settings/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247732581,"owners_count":20986890,"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","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":["python","python-configuration","settings","toml","toml-config"],"created_at":"2024-11-06T06:21:04.129Z","updated_at":"2025-10-18T00:27:06.142Z","avatar_url":"https://github.com/seapagan.png","language":"Python","funding_links":["https://github.com/sponsors/seapagan","https://ko-fi.com/grantramsay","https://www.buymeacoffee.com/seapagan"],"categories":[],"sub_categories":[],"readme":"# Simple TOML Settings \u003c!-- omit in toc --\u003e\n\n[![PyPI version](https://badge.fury.io/py/simple-toml-settings.svg)](https://badge.fury.io/py/simple-toml-settings)\n[![Test Suite](https://github.com/seapagan/simple-toml-settings/actions/workflows/testing.yml/badge.svg)](https://github.com/seapagan/simple-toml-settings/actions/workflows/testing.yml)\n[![Codacy Coverage](https://app.codacy.com/project/badge/Coverage/b8793a3d6eb04167b9e2b13e11f1f12d)](https://app.codacy.com/gh/seapagan/simple-toml-settings/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_coverage)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b8793a3d6eb04167b9e2b13e11f1f12d)](https://app.codacy.com/gh/seapagan/simple-toml-settings/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![CodeQL](https://github.com/seapagan/simple-toml-settings/actions/workflows/codeql.yml/badge.svg)](https://github.com/seapagan/simple-toml-settings/actions/workflows/codeql.yml)\n\nA Python library to save your settings in a TOML file.\n\n- [Development Status](#development-status)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Setup](#setup)\n  - [Using the settings](#using-the-settings)\n- [Development setup](#development-setup)\n- [License](#license)\n- [Credits](#credits)\n\n## Development Status\n\nNote that there is still additional functionality planned to be added to this\npackage, but the methodology is to keep the package simple to use and\nunderstand. Any additional functionality will be added in a way that is backward\ncompatible and optional.\n\nThe package is considered stable and is being used in production in several\nnon-trivial applications.\n\nPlease report any bugs you find on the\n[issue tracker](https://github.com/seapagan/simple-toml-settings/issues) and\nfeel free to make suggestions for improvements.\n\n## Installation\n\nYou should install this package into a virtual environment.  You can use\n[uv](https://docs.astral.sh/uv/) (recommended), or\n[Poetry](https://python-poetry.org/) to do this:\n\n```console\n$ uv add simple-toml-settings\n```\n\nor\n\n```console\n$ poetry add simple-toml-settings\n```\n\nIf you don't want to use Poetry, you can use pip from inside your virtual\nenvironment:\n\n```console\n$ pip install simple-toml-settings\n```\n\n## Usage\n\nThis is a library to save your settings in a TOML file.  It is designed to be\nsimple to use and to be able to save and load settings from a TOML file with a\nminimal of configuration.\n\nThe below is a minimal example, for full documentation and information on\navailable options, see the [documentation\nsite](https://seapagan.github.io/simple-toml-settings/). There are several flags\nyou can set to change the location of the settings file, the name of the file,\nallowing to run without a settings file, and more.\n\nUsage is simple:\n\n### Setup\n\n```python\nfrom simple_toml_settings import TOMLSettings\n\nclass MySettings(TOMLSettings):\n    \"\"\"My settings class.\"\"\"\n\n    # Define the settings you want to save\n    name: str = \"My Name\"\n    age: int = 42\n    favourite_colour: str = \"blue\"\n    favourite_number: int = 42\n    favourite_foods: list = [\"pizza\", \"chocolate\", \"ice cream\"]\n\n\nsettings = MySettings(\"test_app\")\n```\n\nThe above will automatically create a TOML file in the user's **home** directory\ncalled `config.toml`, in the subdirectory `.test_app/`, and save the settings to\nit. If the file already exists, the settings will be loaded from it.\n\nThe file contents for the above example would be:\n\n```toml\n[test_app]\nage = 42\nfavourite_colour = \"blue\"\nfavourite_number = 42\nname = \"My Name\"\nschema_version = \"none\"\nfavourite_foods = [\"pizza\", \"chocolate\", \"ice cream\"]\n```\n\n### Using the settings\n\nOnce you have created your settings class, you can use it like any other class:\n\n```python\nsettings = MySettings(\"test_app\")\nsettings.favourite_colour = \"red\"\nsettings.save()\n```\n\n## Development setup\n\nSee the [Contributing Guidelines](CONTRIBUTING.md) for details of how to\ncontribute to this project and set it up for development.\n\n## License\n\nThis project is released under the terms of the MIT license.\n\n## Credits\n\nThe original Python boilerplate for this package was created using\n[Pymaker](https://github.com/seapagan/py-maker) by [Grant\nRamsay (seapagan)](https://github.com/seapagan) (Me!! 😄).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseapagan%2Fsimple-toml-settings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseapagan%2Fsimple-toml-settings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseapagan%2Fsimple-toml-settings/lists"}