{"id":22938197,"url":"https://github.com/hootnot/yachain","last_synced_at":"2026-04-28T08:32:26.883Z","repository":{"id":57477975,"uuid":"93232099","full_name":"hootnot/yachain","owner":"hootnot","description":"YAML access by chained attribute names","archived":false,"fork":false,"pushed_at":"2019-05-14T15:06:06.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-26T00:56:12.485Z","etag":null,"topics":["configuration","configuration-parser","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/hootnot.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","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":"2017-06-03T07:38:06.000Z","updated_at":"2019-05-14T15:06:07.000Z","dependencies_parsed_at":"2022-09-10T08:22:54.817Z","dependency_job_id":null,"html_url":"https://github.com/hootnot/yachain","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/hootnot/yachain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hootnot%2Fyachain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hootnot%2Fyachain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hootnot%2Fyachain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hootnot%2Fyachain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hootnot","download_url":"https://codeload.github.com/hootnot/yachain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hootnot%2Fyachain/sbom","scorecard":{"id":468981,"data":{"date":"2025-08-11","repo":{"name":"github.com/hootnot/yachain","commit":"7290241216cf77928b6d43c780abbd112cfcf853"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":0,"reason":"Found 0/27 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":"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":-1,"reason":"no dependencies found","details":null,"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2020-176 / GHSA-3pqx-4fqf-j49f","Warn: Project is vulnerable to: PYSEC-2020-96 / GHSA-6757-jp84-gxfx","Warn: Project is vulnerable to: PYSEC-2021-142 / GHSA-8q59-q68h-6hv4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T13:17:43.170Z","repository_id":57477975,"created_at":"2025-08-19T13:17:43.171Z","updated_at":"2025-08-19T13:17:43.171Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32373498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","response_time":56,"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":["configuration","configuration-parser","yaml","yaml-configuration"],"created_at":"2024-12-14T12:16:26.636Z","updated_at":"2026-04-28T08:32:26.853Z","avatar_url":"https://github.com/hootnot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"yachain\n=======\n\n.. image:: https://travis-ci.org/hootnot/yachain.svg?branch=master\n    :target: https://travis-ci.org/hootnot/yachain\n\n.. image:: https://img.shields.io/pypi/pyversions/yachain.svg\n    :target: https://github.com/hootnot/yachain\n\n.. image:: https://img.shields.io/pypi/v/yachain.svg\n   :target: https://pypi.org/project/yachain\n   :alt: PyPI\n\n.. image:: https://coveralls.io/repos/github/hootnot/yachain/badge.svg?branch=master\n    :target: https://coveralls.io/github/hootnot/yachain?branch=master\n\n\nYAML access on chained attribute names.\n\nInstall\n-------\n\n.. code-block:: shell\n\n   $ pip install yachain\n\n\nSuppose we have:\n\n.. code-block:: yaml\n\n   ---\n   # config\n   network:\n      name: developers\n      gitserver:\n         ip: 192.168.178.101\n         netmask: 255.255.255.0\n         gateway: 192.168.178.1\n         packages:\n         - yum\n         - gcc\n\n\nWith *yachain* we can access this as:\n\n.. code-block:: python\n\n   \u003e\u003e\u003e import yachain\n\n   \u003e\u003e\u003e c = yachain.Config().load(\"netw.cfg\")\n   \u003e\u003e\u003e print(c[\"network::gitserver::gateway\"])\n   192.168.178.1\n   \u003e\u003e\u003e print(c[\"network::gitserver::packages\"])\n   ['yum', 'gcc']\n\n\nReferences to files / paths independent from environment\n--------------------------------------------------------\n\nReferences to files and paths can be used relative and absolute.\nIn case an attribute ends on *path* or *file* then the path can be\nprefixed automatically when operation from a virtual environment is detected.\nThe works by default upper and lower case and can be overriden.\n\nUsing the *prefix* makes it possible to use the same config in different\nenvironments.\n\n.. code-block:: python\n\n   import yachain\n   import yaml\n   import sys\n   import os\n\n   # yaml config:\n   yc = \"\"\"\n   ---\n   app:\n     logfile: var/log/app.log\n     textrules: var/app.app.txt\n     database_path: var/app/db\n     database_file: /var/app/db/db.txt\n     database_name: db.txt\n   \"\"\"\n\n   PREFIX = \"/\" if not hasattr(sys, 'real_prefix') else sys.prefix\n   # CONFIG_FILE = os.path.join(PREFIX, \"etc/app/app.cfg\")\n   config = yachain.Config(prefix=PREFIX, configdata=yaml.load(yc))\n\n\n   for A in [\"logfile\",\n             \"textrules\",\n             \"database_path\",\n             \"database_file\",\n             \"database_name\"]:\n       k = \"app::{}\".format(A)\n       print config[k]\n\n\nWhen run from a virtual environment, this will give us:\n\n.. code-block:: bash\n\n   /home/user/venv/var/log/app.log\n   var/app.app.txt\n   /home/user/venv/var/app/db\n   /var/app/db/db.txt\n   db.txt\n\n\nSo, as expected, the *logfile* and *database_path* got the PREFIX.\n\nWhen run from a non-virtual environment, this will give us:\n\n.. code-block:: bash\n\n   /var/log/app.log\n   var/app.app.txt\n   /var/app/db\n   /var/app/db/db.txt\n   db.txt\n\n\nSo, as expected, prefixed with \"/\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhootnot%2Fyachain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhootnot%2Fyachain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhootnot%2Fyachain/lists"}