{"id":19530045,"url":"https://github.com/goktug97/pipcs","last_synced_at":"2026-06-09T01:32:35.936Z","repository":{"id":57452863,"uuid":"355671033","full_name":"goktug97/pipcs","owner":"goktug97","description":"PIPCS is Python Configuration System","archived":false,"fork":false,"pushed_at":"2021-05-10T13:58:18.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T13:56:52.250Z","etag":null,"topics":["config","configuration","configuration-management","python","python-configuration"],"latest_commit_sha":null,"homepage":"https://pipcs.readthedocs.io/","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/goktug97.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}},"created_at":"2021-04-07T20:15:27.000Z","updated_at":"2021-05-10T13:58:20.000Z","dependencies_parsed_at":"2022-08-28T16:03:03.833Z","dependency_job_id":null,"html_url":"https://github.com/goktug97/pipcs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/goktug97/pipcs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goktug97%2Fpipcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goktug97%2Fpipcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goktug97%2Fpipcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goktug97%2Fpipcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goktug97","download_url":"https://codeload.github.com/goktug97/pipcs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goktug97%2Fpipcs/sbom","scorecard":{"id":434299,"data":{"date":"2025-08-11","repo":{"name":"github.com/goktug97/pipcs","commit":"347ba64d94f9098e0a78232e896b3f74d83726bb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/29 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-package.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":"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":"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/python-package.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/goktug97/pipcs/python-package.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-package.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/goktug97/pipcs/python-package.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/python-package.yml:30","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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"}}]},"last_synced_at":"2025-08-19T04:12:26.566Z","repository_id":57452863,"created_at":"2025-08-19T04:12:26.566Z","updated_at":"2025-08-19T04:12:26.566Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34088013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"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","configuration","configuration-management","python","python-configuration"],"created_at":"2024-11-11T01:28:49.252Z","updated_at":"2026-06-09T01:32:35.922Z","avatar_url":"https://github.com/goktug97.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"PIPCS: PIPCS is Python Configuration System\n-------------------------------------------\n![Test](https://github.com/goktug97/pipcs/actions/workflows/python-package.yml/badge.svg)\n\npipcs is an experimental library to create configuration files for Python.\n\n# Installation\n\n```bash\npip install pipcs --user\n```\n\n# Documentation\nhttps://pipcs.readthedocs.io/\n\n# Example\nhttps://github.com/goktug97/nes-torch/blob/master/nes/config.py\n\n# Example Scenario\n\n- In some_program.py:\n```python\nfrom dataclasses import field\nfrom typing import Dict, Type, Callable, Union, List\n\nimport torch\nimport numpy as np\nimport gym\n\nfrom pipcs import Config, Choices, Condition, Required, required\n\ndefault_config = Config()\n\n@default_config('optimizer')\nclass OptimizerConfig():\n    optim_type: Choices[Type[torch.optim.Optimizer]] = Choices([torch.optim.Adam, torch.optim.SGD], default=torch.optim.Adam)\n    weight_decay: float = 0.0\n    lr: float = 0.001\n    betas: Condition[Tuple[float, float]] = Condition((0.9, 0.999), optim_type == torch.optim.Adam)\n    eps: Condition[float] = Condition(1e-08, optim_type == torch.optim.Adam)\n    momentum: Condition[float] = Condition(0.0, optim_type == torch.optim.SGD)\n    dampening: Condition[float] = Condition(0.0, optim_type == torch.optim.SGD)\n\n@default_config('environment')\nclass EnvironmentConfig():\n    env_id: Required[str] = required\n\n@default_config('policy')\nclass PolicyConfig():\n    input_size: Required[int] = required\n    hidden_layers: List[int] = field(default_factory=lambda: [])\n    output_size: Required[int] = required\n    output_func: Required[Callable[[torch.Tensor], Union[int, np.ndarray]]] = required\n    activation: torch.nn.Module = torch.nn.ReLU\n\nclass Policy(torch.nn.Module):\n    def __init__(self, input_size, hidden_layers, output_size, activation, output_func):\n        super().__init__()\n        self.seq = torch.nn.Sequential(\n            torch.nn.Linear(input_size, 64),\n            activation(),\n            torch.nn.Linear(64, 64),\n            activation(),\n            torch.nn.Linear(64, output_size))\n\nclass ReinforcementLearning():\n    def __init__(self, config: Config = default_config):\n        self.config = config\n        self.policy = Policy(**config.policy.to_dict())\n        self.optim = self.make_optimizer(parameters=self.policy.parameters(), **config.optimizer.to_dict())\n        self.env = gym.make(config.environment.env_id)\n\n    def make_optimizer(self, optim_type, parameters, **kwargs):\n        return optim_type(parameters, **kwargs)\n```\n\n- In user file:\n```python\nfrom pipcs import Config, Condition\n\nimport gym\nimport torch\nfrom dataclasses import field\n\nfrom some_program import default_config, ReinforcementLearning\n\nuser_config = Config(default_config)\n\n@user_config('optimizer')\nclass UserOptimizerConfig():\n    optim_type = torch.optim.Adam\n    # Users can add their own variables too\n    amsgrad: Condition[bool] = Condition(False, default_config.optimizer.optim_type == torch.optim.Adam)\n    nesterov: Condition[bool] = Condition(False, default_config.optimizer.optim_type == torch.optim.SGD)\n\n@user_config('environment')\nclass UserEnvironmentConfig():\n    env_id = 'CartPole-v1'\n\n@user_config('policy')\nclass UserPolicyConfig():\n    env = gym.make(user_config.environment.env_id)\n    input_size = env.observation_space.shape[0]\n    hidden_layers = field(default_factory=lambda: [64, 32])\n    if isinstance(env.action_space, gym.spaces.Discrete):\n        output_size = env.action_space.n\n        output_func = lambda x: x.argmax().item()\n    else:\n        output_size = env.action_space.shape[0]\n        output_func = lambda x: x.detach().numpy()\n\nReinforcementLearning(user_config)\n```\n\n- *Note*: If a config is not inherited, `typing` is necessary. Also, if you are adding your own variable to the inherited config and want it to be register, you need to specify the type. Putting the correct type is not necessary. `'typing.Any'` can be used if you don't want to bother with `typing` but they are important if you are using a static type checking tool such as `mypy`.\n\n## Accessing Variables\n```python\n\u003e\u003e\u003e from pipcs import Config\n\u003e\u003e\u003e \n\u003e\u003e\u003e config = Config()\n\u003e\u003e\u003e \n\u003e\u003e\u003e @config.add('configuration')\n... class Foo():\n...     bar: str = 'bar'\n...     baz: int = 1\n... \n\u003e\u003e\u003e print(config.configuration.bar)\nbar\n\u003e\u003e\u003e print(config.configuration.baz)\n1\n\u003e\u003e\u003e print(config['configuration']['bar'])\nbar\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoktug97%2Fpipcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoktug97%2Fpipcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoktug97%2Fpipcs/lists"}