{"id":29656540,"url":"https://github.com/zincware/znfields","last_synced_at":"2025-08-14T12:40:21.086Z","repository":{"id":251361543,"uuid":"837188273","full_name":"zincware/znfields","owner":"zincware","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-04T20:08:23.000Z","size":77,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-04T22:55:56.759Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zincware.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-02T12:00:32.000Z","updated_at":"2025-05-09T15:07:17.000Z","dependencies_parsed_at":"2024-08-02T13:44:13.822Z","dependency_job_id":"b255e2c2-7473-43b2-9a64-e392f038a73a","html_url":"https://github.com/zincware/znfields","commit_stats":null,"previous_names":["zincware/znfields"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/zincware/znfields","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zincware%2Fznfields","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zincware%2Fznfields/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zincware%2Fznfields/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zincware%2Fznfields/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zincware","download_url":"https://codeload.github.com/zincware/znfields/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zincware%2Fznfields/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270422198,"owners_count":24580819,"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-08-14T02:00:10.309Z","response_time":75,"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":[],"created_at":"2025-07-22T08:35:53.082Z","updated_at":"2025-08-14T12:40:20.991Z","avatar_url":"https://github.com/zincware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![zincware](https://img.shields.io/badge/Powered%20by-zincware-darkcyan)](https://github.com/zincware)\n[![PyPI version](https://badge.fury.io/py/znfields.svg)](https://badge.fury.io/py/znfields)\n[![Coverage Status](https://coveralls.io/repos/github/zincware/znfields/badge.svg?branch=main)](https://coveralls.io/github/zincware/znfields?branch=main)\n\n# znfields\n\nProvide a `getter` and `setter` for `dataclasses.fields` to allow e.g. for lazy\nevaluation or field content validation.\n\n```bash\npip install znfields\n```\n\n## Example\n\nThe `znfields.field` supports all arguments from `dataclasses.field` with the\nadditional `getter` argument.\n\n```python\nimport dataclasses\nimport znfields\n\ndef getter(self, name) -\u003e str:\n    return f\"{name}:{self.__dict__[name]}\"\n\ndef setter(self, name, value) -\u003e None:\n    if not isinstance(value, float):\n        raise ValueError(f\"Value {value} is not a float\")\n    self.__dict__[name] = value\n\n@dataclasses.dataclass\nclass MyModel(znfields.Base):\n    parameter: float = znfields.field(getter=getter, setter=setter)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzincware%2Fznfields","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzincware%2Fznfields","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzincware%2Fznfields/lists"}