{"id":18289848,"url":"https://github.com/prahladyeri/cfgsaver","last_synced_at":"2025-04-05T09:31:49.182Z","repository":{"id":62561502,"uuid":"192605893","full_name":"prahladyeri/cfgsaver","owner":"prahladyeri","description":"Module to save and fetch configuration data in a standard path and format","archived":false,"fork":false,"pushed_at":"2021-08-10T03:46:51.000Z","size":146,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T02:22:00.365Z","etag":null,"topics":["configuration","configuration-management","devops","python"],"latest_commit_sha":null,"homepage":"https://github.com/prahladyeri/cfgsaver","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/prahladyeri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-18T20:10:26.000Z","updated_at":"2021-08-10T03:46:53.000Z","dependencies_parsed_at":"2022-11-03T15:15:28.742Z","dependency_job_id":null,"html_url":"https://github.com/prahladyeri/cfgsaver","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prahladyeri%2Fcfgsaver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prahladyeri%2Fcfgsaver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prahladyeri%2Fcfgsaver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prahladyeri%2Fcfgsaver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prahladyeri","download_url":"https://codeload.github.com/prahladyeri/cfgsaver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318311,"owners_count":20919457,"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":["configuration","configuration-management","devops","python"],"created_at":"2024-11-05T14:08:33.000Z","updated_at":"2025-04-05T09:31:47.461Z","avatar_url":"https://github.com/prahladyeri.png","language":"Python","funding_links":["https://www.patreon.com/prahladyeri","https://paypal.me/prahladyeri"],"categories":[],"sub_categories":[],"readme":"![pypi](https://img.shields.io/pypi/v/cfgsaver.svg)\n![python](https://img.shields.io/pypi/pyversions/cfgsaver.svg)\n![license](https://img.shields.io/github/license/prahladyeri/cfgsaver.svg)\n![docs](https://readthedocs.org/projects/cfgsaver/badge/?version=latest)\n[![patreon](https://img.shields.io/badge/Patreon-brown.svg?logo=patreon)](https://www.patreon.com/prahladyeri)\n[![paypal](https://img.shields.io/badge/PayPal-blue.svg?logo=paypal)](https://paypal.me/prahladyeri)\n[![follow](https://img.shields.io/twitter/follow/prahladyeri.svg?style=social)](https://twitter.com/prahladyeri)\n\n# cfgsaver\n\n![project logo](https://raw.githubusercontent.com/prahladyeri/cfgsaver/master/logo.png)\n\nPython library to save and fetch configuration data in a standard/conventional path and format.\n\n# Installation\n\n```bash\npip install cfgsaver\n```\n\n# Usage\n\nImport the `cfgsaver` module to save/read configuration values in your source files:\n\n```python\nfrom cfgsaver import cfgsaver\n\ndef save_config():\n\t# saves configuration data to ~/.config/\u003cyour_package\u003e/cfg.json\n\t# unless cfgpath parameter is overridden:\n\tconfig = {\n\t'name': 'Prahlad', \n\t'language': 'Python', \n\t'framework': 'Flask'\n\t}\n\tcfgsaver.save('\u003cyour_package\u003e', config)\n\ndef get_config():\n\t# gets configuration data from ~/.config/\u003cyour_package\u003e/cfg.json \n\t# unless cfgpath parameter is overridden:\n\tconfig = cfgsaver.get(\"\u003cyour_package\u003e\") #returns None if config file doesn't exist\n\t\ndef prompt_user():\n\t# prompts user for config keys and saves resulting values as per save_config()\n\tconfig = {\n\t'name': '', \n\t'language': '', \n\t'framework': ''\n\t}\n\tconfig = cfgsaver.get_from_cmd(\"\u003cyour_package\u003e\", config.keys())\n```\n\nFor information on shipping default configuration data packaged with your app using `setup.py`, read [detailed docs](https://cfgsaver.readthedocs.io/en/latest/).\n\n# Documentation\n\nDetailed docs are available at \u003chttps://cfgsaver.readthedocs.io/en/latest/\u003e.\n\t\n# Attribution\n\n\u003cdiv\u003eIcons made by \u003ca href=\"https://www.flaticon.com/authors/smashicons\" title=\"Smashicons\"\u003eSmashicons\u003c/a\u003e from \u003ca href=\"https://www.flaticon.com/\" \t\t    title=\"Flaticon\"\u003ewww.flaticon.com\u003c/a\u003e is licensed by \u003ca href=\"http://creativecommons.org/licenses/by/3.0/\" \t\t    title=\"Creative Commons BY 3.0\" target=\"_blank\"\u003eCC 3.0 BY\u003c/a\u003e\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprahladyeri%2Fcfgsaver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprahladyeri%2Fcfgsaver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprahladyeri%2Fcfgsaver/lists"}