{"id":25138417,"url":"https://github.com/ibm/alchemy-config","last_synced_at":"2025-04-24T03:08:06.139Z","repository":{"id":47651105,"uuid":"397981985","full_name":"IBM/alchemy-config","owner":"IBM","description":"The aconfig library supports yaml-based configuration files with environment-variable overrides in python","archived":false,"fork":false,"pushed_at":"2024-10-30T15:05:04.000Z","size":41,"stargazers_count":0,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-24T03:07:58.043Z","etag":null,"topics":["configuration","python","yaml","yaml-configuration"],"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/IBM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2021-08-19T15:01:49.000Z","updated_at":"2024-10-30T15:08:24.000Z","dependencies_parsed_at":"2022-09-18T07:09:17.154Z","dependency_job_id":null,"html_url":"https://github.com/IBM/alchemy-config","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Falchemy-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Falchemy-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Falchemy-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Falchemy-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IBM","download_url":"https://codeload.github.com/IBM/alchemy-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250552074,"owners_count":21449164,"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","python","yaml","yaml-configuration"],"created_at":"2025-02-08T17:16:11.389Z","updated_at":"2025-04-24T03:08:06.121Z","avatar_url":"https://github.com/IBM.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alchemy Config\nThe `aconfig` library provides simple `yaml` configuration in `python` with environment-based overrides.\n\n## Library advantages\n1. Easily reads environment variables with error handling, e.g. for absence of variables or boolean capitalization\n1. Allows users to easily access and traverse nested configuration without checking for key presence on every access\n1. Automatically handles overriding logic - environment variables take precedence over local configuration files\n\n## Installation\n\nTo install, simply use `pip`\n\n```sh\npip install alchemy-config\n```\n\n## Quick Start\n\n**config.yaml**\n```yaml\nfoo: 1\nbar:\n    baz: \"bat\"\n```\n\n**main.py**\n```py\nimport aconfig\n\nif __name__ == \"__main__\":\n    config = aconfig.Config.from_yaml(\"config.yaml\")\n    print(config.foo)\n    print(config.bar.baz)\n```\n\n```sh\nexport BAR_BAZ=\"buz\"\npython3 main.py\n```\n\n## Corner-case Behavior\n\nYou CAN set builtin method names as attributes on the `config`. However, you should only access/delete them via dictionary access methods.\n\nFor example:\n\n```py\nimport aconfig\ncfg = {\"update\": True}\n\nconfig = aconfig.Config(cfg)\n\n# DO NOT DO THIS:\nconfig.update\n\n# DO THIS INSTEAD:\nconfig[\"update\"]\n```\n\nThis is because there is no way in Python to tell whether you want the method or the attribute `\"update\"` when \"getting\" it from the object.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibm%2Falchemy-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibm%2Falchemy-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibm%2Falchemy-config/lists"}