{"id":30883252,"url":"https://github.com/globocom/derpconf","last_synced_at":"2025-09-08T09:43:49.455Z","repository":{"id":4146500,"uuid":"5260279","full_name":"globocom/derpconf","owner":"globocom","description":"derpconf abstracts loading configuration files for your app.","archived":false,"fork":false,"pushed_at":"2023-10-13T12:49:43.000Z","size":81,"stargazers_count":31,"open_issues_count":13,"forks_count":12,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-08-21T11:03:36.755Z","etag":null,"topics":["configs","configuration-files","python"],"latest_commit_sha":null,"homepage":null,"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/globocom.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,"governance":null}},"created_at":"2012-08-01T14:28:36.000Z","updated_at":"2025-08-13T01:20:35.000Z","dependencies_parsed_at":"2023-10-12T01:30:54.275Z","dependency_job_id":"a3c4e4a6-0a77-428f-a65e-fdad1474a465","html_url":"https://github.com/globocom/derpconf","commit_stats":{"total_commits":112,"total_committers":14,"mean_commits":8.0,"dds":0.5446428571428572,"last_synced_commit":"781c878b1cd904aa38a0d25ae93a2439ad811063"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/globocom/derpconf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fderpconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fderpconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fderpconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fderpconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/globocom","download_url":"https://codeload.github.com/globocom/derpconf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/globocom%2Fderpconf/sbom","scorecard":{"id":430040,"data":{"date":"2025-08-11","repo":{"name":"github.com/globocom/derpconf","commit":"ff63582ebac8bf03edfc84299c8c97bb9ce62ebf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Code-Review","score":2,"reason":"Found 5/25 approved changesets -- score normalized to 2","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":"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":"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":"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":"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/test.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/globocom/derpconf/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/globocom/derpconf/test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:22","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.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":"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2023-177 / GHSA-x7m3-jprg-wc5g"],"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":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 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-19T03:07:24.452Z","repository_id":4146500,"created_at":"2025-08-19T03:07:24.452Z","updated_at":"2025-08-19T03:07:24.452Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274166928,"owners_count":25233959,"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-09-08T02:00:09.813Z","response_time":121,"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":["configs","configuration-files","python"],"created_at":"2025-09-08T09:43:47.434Z","updated_at":"2025-09-08T09:43:49.437Z","avatar_url":"https://github.com/globocom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# derpconf\n\nderpconf abstracts loading configuration files for your app. derpconf was\nextracted from [thumbor](http://github.com/globocom/thumbor/).\n\n## Intalling\n\nInstalling derpconf is as easy as:\n\n```\npip install derpconf\n```\n\n## Usage\n\nUsing it is as simple as:\n\n```python\nfrom derpconf.config import Config\n\nconf = Config.load('/path/to/my/cfg.conf')\n\nassert conf.MY_KEY == 'MY_VALUE' # assuming there's a key called MY_KEY in\n                                 # the configuration file.\n```\n\n## Settings Defaults\n\nIf you want to set default values for your configurations, just call:\n\n```python\nConfig.define('MY-KEY', 'DEFAULT VALUE', 'Description for my key', 'Section')\n```\n\nThe values that define gets are:\n\n* the configuration key;\n* the default value for that key if it's not found in the configuration file;\n* the description for this key. This is very useful for generating\n  configuration file examples.\n* the section that this key belongs to. Again very useful for generating\n  configuration file examples.\n\n## Using Environment Variables\n\nIf you wish to allow environment variables to be used as the value of\nconfiguration keys, just call the `allow_environment_variables` method in your\n`config.py` file:\n\n```python\nfrom derpconf.config import Config\n\nConfig.allow_environment_variables()\n```\n\nIf there's an environment variable with the same name as the given\nconfiguration, derpconf will give precedence to it, instead of using the\ndefault value or the value in the configuration file.\n\n```python\n# called program with SOMETHING=value myprogram.py\nassert config.SOMETHING == \"value\"\n\n# even if the default for 'SOMETHING' or the value in the config file is different from 'value'\n```\n\n## Reloading Configurations\n\nAfter you've loaded configurations from a file, sometimes it's needed to have\nthem reloaded. This is the case when a new module needs to define some new\ndefault values.\n\nIn order to reload values from a config object, just call `reload` on it:\n\n```python\nfrom derpconf.config import Config\n\nconf = Config.load('/path/to/my/cfg.conf')\n\n# then later on...\n\nConfig.define('SOMENEWFOO', 'bar', 'baz', 'foo')\n\nconf.reload()\nassert conf.SOMENEWFOO == 'bar'\n```\n\n## Generating Configuration Examples\n\nTo generate a configuration example, you just need to call the\n`get_config_text` method. Let's see an example:\n\n```python\nfrom derpconf.config import Config\n\nConfig.define('foo', 'fooval', 'Foo is always a foo', 'FooValues')\nConfig.define('bar', 'barval', 'Bar is not always a bar', 'BarValues')\nConfig.define('baz', 'bazval', 'Baz is never a bar', 'BarValues')\n\nconfig_sample = Config.get_config_text()\nprint config_sample # or instead of both, just call generate_config()\n```\n\nThe following text will be print into the standard output:\n\n```python\n################################## FooValues ###################################\n\n## Foo is always a foo\n## Defaults to: fooval\n#foo = 'fooval'\n\n################################################################################\n\n\n################################## BarValues ###################################\n\n## Bar is not always a bar\n## Defaults to: barval\n#bar = 'barval'\n\n## Baz is never a bar\n## Defaults to: bazval\n#baz = 'bazval'\n\n################################################################################\n```\n\nA good sample of using derpconf can be seen at [thumbor's configuration\nfile](https://github.com/globocom/thumbor/blob/master/thumbor/config.py).\n\n## Verifying a Configuration File\n\nderpconf includes a configuration file verifier. The purpose of this verifier\nis to help you quickly understand what configuration files are missing what\nkeys and what values will be used for them instead.\n\nRunning it is as simple as including a call to `verify_config` in your\n`config.py` file:\n\n```python\nverify_config(file_path)\n```\n\nOr you can leave it blank and derpconf will get the file path from `sys.argv`:\n\n```python\nverify_config()\n```\n\nThe output of the verifier is something like this:\n\n```python\nConfiguration \"baz\" not found in file /Users/bernardo/dev/derpconf/vows/fixtures/missing.conf. Using \"bazval\" instead.\nConfiguration \"foo\" not found in file /Users/bernardo/dev/derpconf/vows/fixtures/missing.conf. Using \"fooval\" instead.\nConfiguration \"bar\" not found in file /Users/bernardo/dev/derpconf/vows/fixtures/missing.conf. Using \"barval\" instead.\n```\n\nYou can see it in use at [derpconf's code](https://github.com/globocom/derpconf/blob/master/derpconf/config.py).\n\n## License\n\nderpconf is licensed under the MIT License:\n\nThe MIT License\n\nCopyright (c) 2012 globo.com timehome@corp.globo.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fderpconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglobocom%2Fderpconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglobocom%2Fderpconf/lists"}