{"id":16164341,"url":"https://github.com/kisom/pysimpleconfig","last_synced_at":"2025-04-07T04:47:53.702Z","repository":{"id":5510863,"uuid":"6711334","full_name":"kisom/pysimpleconfig","owner":"kisom","description":"A dead simple Python configuration file reader.","archived":false,"fork":false,"pushed_at":"2019-06-24T18:56:52.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T00:25:27.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kisom.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-15T20:40:55.000Z","updated_at":"2023-07-25T13:46:31.000Z","dependencies_parsed_at":"2022-07-06T22:04:45.819Z","dependency_job_id":null,"html_url":"https://github.com/kisom/pysimpleconfig","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kisom%2Fpysimpleconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kisom%2Fpysimpleconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kisom%2Fpysimpleconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kisom%2Fpysimpleconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kisom","download_url":"https://codeload.github.com/kisom/pysimpleconfig/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595379,"owners_count":20963943,"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":[],"created_at":"2024-10-10T02:46:19.409Z","updated_at":"2025-04-07T04:47:53.676Z","avatar_url":"https://github.com/kisom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"simpleconfig\n============\n\n.. image:: https://travis-ci.org/kisom/pysimpleconfig.svg?branch=master\n    :target: https://travis-ci.org/kisom/pysimpleconfig\n\nwhat?\n-----\n\nsimpleconfig is a Python module that reads INI files into a dictionary. It\nis both Python 2 and Python 3 compatible.\n\nwhy?\n----\nI've written this code several times for a couple projects; I got sick of\ncopying the file over to new project directories.\n\nhow?\n----\n\nBoth a ``parse`` and ``parse_string`` function are provided. The former parses\nconfig files, and the latter parses a config file serialised into a string.\n\nreturn value and example\n------------------------\nBoth ``parse()`` and ``parse_string`` return a dictionary (see below) where each\nsection is a key at the top level,\nand is a dictionary of key=value pairs itself. For example, given the config\nfile::\n\n\t\u003e\u003e\u003e config = \"\"\"\n\t# random version information\n\tversion = 1.0.5\n\n\t; last modified 1 April 2001 by John Doe\n\t; example taken from wikipedia\n\t[owner]\n\tname=John Doe\n\torganization=Acme Widgets Inc.\n\n\t[database]\n\t# use IP address in case network name resolution is not working\n\tserver=192.0.2.62\n\tport=143\n\tfile=\"payroll.dat\"\n\t\"\"\"\n\nParsing this with ``simpleconfig`` yields::\n\n\t\u003e\u003e\u003e import simpleconfig as sc\n\t\u003e\u003e\u003e cfg = sc.parse_string(config)\n\t\u003e\u003e\u003e cfg['owner']['name']\n\t'John Doe'\n\t\u003e\u003e\u003e cfg.owner.name\n\t'John Doe'\n\nNote that the dictionary type returned by the parse functions is actually a\n`kutils.dicts.AttrDictDict \u003chttp://kutils.readthedocs.io/en/latest/dicts.html\u003e`_,\nwhich is derived from the ``dict`` type and can be used wherever a ``dict`` can.\n\nlicense\n-------\nsimpleconfig is released under an ISC license.\n\nauthor\n------\nsimpleconfig was written by Kyle Isom \u003ccoder@kyleisom.net\u003e.\n\nadditional\n----------\n\nThe module is only tested for compatibility against Python 2.7 and\nPython 3.3+. There are no guarantees (or attempts) at compatibility\nwith previous version of Python.\n\nThe docs are on `RTD \u003chttps://simpleconfig.readthedocs.io\u003e`_.\n\nThe sources for simpleconfig are on `Github \u003chttps://github.com/kisom/pysimpleconfig\u003e`_.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkisom%2Fpysimpleconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkisom%2Fpysimpleconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkisom%2Fpysimpleconfig/lists"}