{"id":29774401,"url":"https://github.com/lingjie00/genconfig","last_synced_at":"2026-05-07T10:38:29.825Z","repository":{"id":60439095,"uuid":"532487340","full_name":"lingjie00/genconfig","owner":"lingjie00","description":"Manage json and yaml configuration in a folder structure","archived":false,"fork":false,"pushed_at":"2023-05-19T13:07:45.000Z","size":126,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-22T08:18:25.833Z","etag":null,"topics":["config","json","yaml"],"latest_commit_sha":null,"homepage":"https://lingjie00.github.io/genconfig/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lingjie00.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-04T08:59:35.000Z","updated_at":"2023-05-19T11:30:11.000Z","dependencies_parsed_at":"2022-09-29T15:50:13.953Z","dependency_job_id":null,"html_url":"https://github.com/lingjie00/genconfig","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/lingjie00/genconfig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingjie00%2Fgenconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingjie00%2Fgenconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingjie00%2Fgenconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingjie00%2Fgenconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lingjie00","download_url":"https://codeload.github.com/lingjie00/genconfig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingjie00%2Fgenconfig/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267319476,"owners_count":24068508,"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-07-27T02:00:11.917Z","response_time":82,"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":["config","json","yaml"],"created_at":"2025-07-27T08:07:34.626Z","updated_at":"2026-05-07T10:38:29.797Z","avatar_url":"https://github.com/lingjie00.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GenConfig\n\n[![package](https://github.com/lingjie00/genconfig/actions/workflows/project-actions.yml/badge.svg)](https://github.com/lingjie00/genconfig/actions/workflows/project-actions.yml)\n\nManage config using folder structure, currently support Json and Yaml.\n\n\n\u003c!-- vim-markdown-toc GFM --\u003e\n\n* [Installation](#installation)\n* [Example usage](#example-usage)\n* [Project overview](#project-overview)\n* [Usage](#usage)\n    * [Parameters](#parameters)\n\n\u003c!-- vim-markdown-toc --\u003e\n\n# Installation\n\n```bash\npip install genconfig\n```\n\n# Example usage\n\n1. Arrange the config files into folders, sub-folders, and files.\n\n    ```\n    sample-config/config-mix/\n    ├── basic.yml\n    ├── function\n    │   ├── function1.json\n    │   └── function2.yml\n    ├── param.yml\n    └── pipeline.json\n\n    1 directory, 5 files\n    ```\n\n2. Run the `genconfig`\n\n    ```bash\n    genconfig sample-config/config-mix -o config.json\n    ```\n\n3. Retrieve a single merged config\n\n    ```\n    {\n        \"name\": \"config-01\",\n        \"training\": true,\n        \"parameters\": {\n            \"num_nodes\": 200,\n            \"num_samples\": 100,\n            \"max_time\": 40\n        },\n        \"function\": {\n            \"function1\": {\n                \"name\": \"transform\",\n                \"param\": \"col1\"\n            },\n            \"function2\": {\n                \"name\": \"load\",\n                \"param\": \"col\"\n            }\n        },\n        \"pipeline\": [\n            {\n                \"name\": \"extraction\",\n                \"function\": \"etl.extraction\"\n            },\n            {\n                \"name\": \"training\",\n                \"function\": \"model.training\"\n            },\n            {\n                \"name\": \"evaluation\",\n                \"function\": \"model.evaluation\"\n            },\n            {\n                \"name\": \"deployment\",\n                \"function\": \"cloud.deploy\"\n            }\n        ]\n    }\n    ```\n\n# Project overview\n\nThe dream of a mature project is to cover most of the essential functions, and\nthe interactions users would require is to modify the configuration files\nbased on specific needs. For example, a user running model training for a new\nregion A does not need to write any new codes, instead simply modifying the\nconfiguration files.\n\nHowever, as the project grows, so does the configuration file. There are various\nsettings region A would require but not all of them need constant updates.\nTherefore, having a programmatic way to update the configuration files and to\ndisplay them in an easy-to-understand format is crucial.\n\nI propose to present the configuration files in a folder structure. The root\nfolder represents the first level keys in the configs, and the subfolders\nrepresent nested keys.\n\nFurthermore, we should allow both json and yaml config files. Json is easy to\ncreate while yaml allows comments and variables creation. Both Json and yaml\nhave their advantages.\n\nThe API documentation is available at\n[https://lingjie00.github.io/genconfig/](https://lingjie00.github.io/genconfig/)\n\nThe GitHub repo is at [https://github.com/lingjie00/genconfig](https://github.com/lingjie00/genconfig)\n\n# Usage\n\n1. Convert a folder structure into a single json config file\n    ```bash\n    genconfig --path=folder_path --output=\"config.json\"\n    ```\n\n## Parameters\n\n- ignored\n    - User can choose to ignore some keys and not expand into sub-folders\n    ```bash\n    # supports regex matching\n    genconfig config_path -o config.json --ignore \"config1.json\" \"config2.yaml\" \"debug.*json\"\n    ```\n- keep\n    - Different from ignored, instead read only files with matching file name\n    ```bash\n    # supports regex matching\n    genconfig config_path -o config.json --keep \"only_this_config.yaml\"\n    ```\n- verbose\n    - the level of logging to display\n    ```bash\n    # refer to python logging for acceptable levels\n    genconfig config_path -o config.json --verbose \"DEBUG\"\n    ```\n- append\n    - useful for manual replace/update values\n    ```bash\n    # input has to be in json format\n    genconfig config_path -o config.json --append \"{'name': 'updated_name'}\"\n    ```\n- read\n    - Useful when there is a mixture of config file types but only want to read\n      a specific file type\n    ```bash\n    genconfig config_path -o config.json --read \"json\"\n    ```\n- folder\n    - useful to ignore folder names as key, then user can arrange config files\n      in any subfolders without worrying about nested keys\n    ```bash\n    genconfig config_path -o config.json --folder False\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingjie00%2Fgenconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flingjie00%2Fgenconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingjie00%2Fgenconfig/lists"}