{"id":45687787,"url":"https://github.com/thesimj/envyaml","last_synced_at":"2026-02-24T15:16:13.859Z","repository":{"id":37271130,"uuid":"163893666","full_name":"thesimj/envyaml","owner":"thesimj","description":"Simple YAML configuration file parser","archived":false,"fork":false,"pushed_at":"2024-07-05T16:20:41.000Z","size":164,"stargazers_count":79,"open_issues_count":9,"forks_count":22,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-05T16:51:43.590Z","etag":null,"topics":["backend","configuration","devops-tools","environment","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/thesimj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-02T21:55:08.000Z","updated_at":"2025-10-04T20:05:00.000Z","dependencies_parsed_at":"2024-06-18T16:40:54.510Z","dependency_job_id":"4c15c41f-96fd-4fb9-8d6f-5c67d4a422b0","html_url":"https://github.com/thesimj/envyaml","commit_stats":{"total_commits":128,"total_committers":7,"mean_commits":"18.285714285714285","dds":0.1796875,"last_synced_commit":"267679de8e42a53d563a80db2e6a53192ec47a45"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/thesimj/envyaml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesimj%2Fenvyaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesimj%2Fenvyaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesimj%2Fenvyaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesimj%2Fenvyaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thesimj","download_url":"https://codeload.github.com/thesimj/envyaml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesimj%2Fenvyaml/sbom","scorecard":{"id":880235,"data":{"date":"2025-08-11","repo":{"name":"github.com/thesimj/envyaml","commit":"267679de8e42a53d563a80db2e6a53192ec47a45"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/6 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/thesimj/envyaml/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/thesimj/envyaml/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/thesimj/envyaml/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/thesimj/envyaml/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/thesimj/envyaml/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/thesimj/envyaml/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/thesimj/envyaml/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/thesimj/envyaml/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/thesimj/envyaml/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/thesimj/envyaml/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/thesimj/envyaml/main.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:33","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:34","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:54","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:55","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:87","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:88","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4","Warn: Project is vulnerable to: PYSEC-2018-49 / GHSA-rprw-h62v-c2w7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T07:51:47.086Z","repository_id":37271130,"created_at":"2025-08-24T07:51:47.086Z","updated_at":"2025-08-24T07:51:47.086Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29787134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["backend","configuration","devops-tools","environment","python","yaml","yaml-configuration"],"created_at":"2026-02-24T15:16:12.527Z","updated_at":"2026-02-24T15:16:13.851Z","avatar_url":"https://github.com/thesimj.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EnvYAML | Easy configuration file parser for structured data\n\n[![Latest Version](https://badgen.net/pypi/v/envyaml)](https://pypi.python.org/pypi/envyaml/)\n[![EnvYaml CI/CD Pipeline](https://github.com/thesimj/envyaml/actions/workflows/main.yml/badge.svg)](https://github.com/thesimj/envyaml/actions/workflows/main.yml)\n[![Coverage Status](https://badgen.net/coveralls/c/github/thesimj/envyaml)](https://coveralls.io/github/thesimj/envyaml?branch=main)\n![Versions](https://badgen.net/pypi/python/envyaml)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Alerts](https://img.shields.io/lgtm/alerts/g/thesimj/envyaml.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/thesimj/envyaml/alerts/)\n[![Code Quality](https://img.shields.io/lgtm/grade/python/g/thesimj/envyaml.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/thesimj/envyaml/context:python)\n[![License](https://img.shields.io/pypi/l/envyaml.svg)](LICENSE)\n[![Downloads](https://static.pepy.tech/personalized-badge/envyaml?period=total\u0026units=international_system\u0026left_color=black\u0026right_color=green\u0026left_text=Downloads)](https://pepy.tech/project/envyaml)\n\n### Motivation\nModern configuration files become to be more and more complex, flexible, and readable.\nYAML file format is perfect to store configuration but had no option to pass environment variables. They give flexibility, readability and provide an option to store complex data structure.\nThis project goal is to simplify usage of the YAML file and environment variables as program configuration files with easy config key access.\n\n\n### Install\n```bash\npip install envyaml\n```\n\n\n### Basic usage\nLet's assume we had a project with this config file `env.yaml`\n\n```yaml\n# env.yaml\nproject:\n  name: \"${PROJECT_NAME}-${PROJECT_ID}\"\n\ndatabase:\n    host: $DATABASE_HOST\n    port: 3301\n    username: username\n    password: $DATABASE_PASSWORD\n    database: test\n\n    table:\n      user: table_user\n      blog: table_blog\n\n    query: |-\n      SELECT * FROM \"users\" WHERE \"user\" = $1 AND \"login\" = $2 AND \"pwd\" = $3\n\n    insert: |-\n      INSERT INTO \"{table}\" (user, login) VALUES ($1, $2)\n\nredis:\n    host: $REDIS_HOST|127.0.0.1\n    port: 5040\n    db: $REDIS_DB|3 # with default value\n\n    config:\n      expire: 300\n      prefix: $REDIS_PREFIX\n\nescaped: $$.extra\n\nempty_env: $NOT_EXIST_ENV_VARIABLE\n```\n\nEnvironment variables set to\n```\nPROJECT_NAME=simple-hello\nPROJECT_ID=42\nDATABASE_HOST=xxx.xxx.xxx.xxx\nDATABASE_PASSWORD=super-secret-password\nREDIS_PREFIX=state\n```\n\nParse file with `EnvYAML`\n\n```python\nfrom envyaml import EnvYAML\n\n# read file env.yaml and parse config\nenv = EnvYAML('env.yaml')\n\n# access project name\nprint(env['project.name'])\n\n# \u003e\u003e simple-hello-42\n\n# access whole database section\nprint(env['database'])\n\n# {\n# 'database': 'test',\n# 'host': 'xxx.xxx.xxx.xxx',\n# 'password': 'super-secret-password',\n# 'port': 3301,\n# 'table':\n#   {\n#       'blog': 'table_blog',\n#       'user': 'table_user'\n#   },\n# 'username': 'username'\n# }\n\n# access database host value as key item\nprint(env['database.host'])\n\n# \u003e\u003e xxx.xxx.xxx.xxx\n\n# access database user table value as key item\nprint(env['database.table.user'])\n\n# \u003e\u003e table_user\n\n# get sql query with $1,$2,$3 variables\nprint(env['database.query'])\n\n# \u003e\u003e SELECT * FROM \"users\" WHERE \"user\" = $1 AND \"login\" = $2 AND \"pwd\" = $3\n\n# using default values if variable not defined\n# one example is redis host and redis port, when $REDIS_HOST not set then default value will be used\nprint(env['redis.host'])\n\n# \u003e\u003e 127.0.0.1\n\n# one example is redis host and redis port, when $REDIS_DB not set then default value will be used\nprint(env['redis.db'])\n\n# \u003e\u003e 3\n\n# access list items by number\nprint(env['list_test'][0])\n\n# \u003e\u003e one\n\n# access list items by number as key\nprint(env['list_test.1'])\n\n# \u003e\u003e two\n\n# test if you have key\nprint('redis.port' in env)\n\n# \u003e\u003e True\n\n```\n\nAccess config with `get` function and default value\n```python\nprint(env.get('not.exist.value', 'default'))\n# \u003e\u003e default\n\nprint(env.get('empty_env', 'default'))\n# \u003e\u003e default\n\nprint(env['empty_env'])\n# \u003e\u003e None\n```\n\nUse `format` function to update placeholder\n```python\nprint(env.format('database.insert', table=\"users\"))\n# \u003e\u003e INSERT INTO \"users\" (user, login) VALUES ($1, $2)\n```\n\n### Strict mode\nThis mode is **enable by default** and prevents from declaring variables that do not exist in `environment variables` or `.env` file. This leads to having runtime `ValueError` exception when variables do not define with message `Strict mode enabled, variable $VAR not defined!`. To disable **strict** mode specify `strict=False` at EnvYAML object initialization. Another option to disable `strict` mode is to define `ENVYAML_STRICT_DISABLE` environment variable before initializing EnvYAML object.\n\n\n### Escaped variables\nIn case of usage `$` in env.yaml file as value double `$$` should be used. Example:\nUse `escaped` variable\n```python\nprint(env['escaped'])\n# \u003e\u003e $.extra\n```\n\n\n### License\nMIT licensed. See the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesimj%2Fenvyaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesimj%2Fenvyaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesimj%2Fenvyaml/lists"}