{"id":25534816,"url":"https://github.com/diegojromerolopez/constattr","last_synced_at":"2026-02-12T01:35:13.655Z","repository":{"id":273059444,"uuid":"918559996","full_name":"diegojromerolopez/constattr","owner":"diegojromerolopez","description":"Enforce your const class attributes in python","archived":false,"fork":false,"pushed_at":"2025-01-19T18:49:34.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-19T21:48:23.548Z","etag":null,"topics":["class-attributes","const","constant","python"],"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/diegojromerolopez.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2025-01-18T08:48:06.000Z","updated_at":"2025-01-19T18:47:06.000Z","dependencies_parsed_at":"2025-01-18T11:39:26.957Z","dependency_job_id":null,"html_url":"https://github.com/diegojromerolopez/constattr","commit_stats":null,"previous_names":["diegojromerolopez/constattr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegojromerolopez%2Fconstattr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegojromerolopez%2Fconstattr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegojromerolopez%2Fconstattr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegojromerolopez%2Fconstattr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diegojromerolopez","download_url":"https://codeload.github.com/diegojromerolopez/constattr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239772032,"owners_count":19694368,"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","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":["class-attributes","const","constant","python"],"created_at":"2025-02-20T03:29:03.178Z","updated_at":"2025-11-11T20:21:13.427Z","avatar_url":"https://github.com/diegojromerolopez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# constattr\n\n![test](https://github.com/diegojromerolopez/constattr/actions/workflows/test.yml/badge.svg)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/diegojromerolopez/constattr/graphs/commit-activity)\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/constattr.svg)](https://pypi.python.org/pypi/constattr/)\n[![PyPI version constattr](https://badge.fury.io/py/constattr.svg)](https://pypi.python.org/pypi/constattr/)\n[![PyPI status](https://img.shields.io/pypi/status/constattr.svg)](https://pypi.python.org/pypi/constattr/)\n[![PyPI download month](https://img.shields.io/pypi/dm/constattr.svg)](https://pypi.python.org/pypi/constattr/)\n[![Maintainability](https://api.codeclimate.com/v1/badges/5317e9072a41570ae66e/maintainability)](https://codeclimate.com/github/diegojromerolopez/constattr/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/5317e9072a41570ae66e/test_coverage)](https://codeclimate.com/github/diegojromerolopez/constattr/test_coverage)\n\nEnforce your class constants in python.\n\n\u003e The only constant in life is change\n\n*Heraclitus*\n\n\u003e Not anymore!\n\n*Didacus I. Granatensis*\n\n## Usage\nDecorate your class with `constclassattrs` and when a class attribute that is uppercase\nis re-assigned the exception `ConstantAssignmentError` will be raised.\n\n## Example\n\n```python\nfrom constattr import constclassattrs\n\n\n@constclassattrs\nclass Example1:\n    MY_CONST1 = '1'\n    MY_CONST2 = '2'\n\n\n# This will raise the ConstAssignmentError exception\nExample1.MY_CONST1 = 'new value for the constant'\n```\n\n## Limitations\nIf your class has a metaclass defined, it will work, but in case of conflict\nthe MRO in the metaclass will choose the [ConstantEnforcerMeta](/constattr/const_enforcer_meta.py)\nclass first.\n\n## Dependencies\nThis package has no dependencies.\n\n## License\n[MIT](LICENSE) license, but if you need any other contact me.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegojromerolopez%2Fconstattr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegojromerolopez%2Fconstattr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegojromerolopez%2Fconstattr/lists"}