{"id":46989793,"url":"https://github.com/a2435191/python-attribute-access-modifiers","last_synced_at":"2026-03-11T13:51:42.499Z","repository":{"id":57456715,"uuid":"396198628","full_name":"a2435191/python-attribute-access-modifiers","owner":"a2435191","description":"Add C#-like `{get; set;}` syntax to Python attributes.","archived":false,"fork":false,"pushed_at":"2021-08-18T03:33:25.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-26T13:06:55.648Z","etag":null,"topics":["access-modifiers","oop-python","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/python-attribute-access-modifiers/","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/a2435191.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-08-15T03:08:37.000Z","updated_at":"2023-12-14T17:31:11.000Z","dependencies_parsed_at":"2022-09-14T05:21:30.865Z","dependency_job_id":null,"html_url":"https://github.com/a2435191/python-attribute-access-modifiers","commit_stats":null,"previous_names":["2435191/python-attribute-access-modifiers"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/a2435191/python-attribute-access-modifiers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a2435191%2Fpython-attribute-access-modifiers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a2435191%2Fpython-attribute-access-modifiers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a2435191%2Fpython-attribute-access-modifiers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a2435191%2Fpython-attribute-access-modifiers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a2435191","download_url":"https://codeload.github.com/a2435191/python-attribute-access-modifiers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a2435191%2Fpython-attribute-access-modifiers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30382760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T12:49:11.341Z","status":"ssl_error","status_checked_at":"2026-03-11T12:46:41.342Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["access-modifiers","oop-python","python"],"created_at":"2026-03-11T13:51:41.791Z","updated_at":"2026-03-11T13:51:42.488Z","avatar_url":"https://github.com/a2435191.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-attribute-access-modifiers\n\nTired of typing `@property` just to make a read-only instance variable? Find yourself wishing for C#'s `{get; set;}` syntax? Look no further than PAAM, which auto-generates property getters, setter, and deleters for you!\n\n## Quickstart\n\nOnce installed, just use the overloaded `|` operator between an instance variable and one of the predefined constants `GET`, `SET`, or `DEL`. Make sure to subclass from `PaamBase`.\n\n```python\nfrom paam import SET, PaamBase\n\nclass Test(PaamBase):\n    def __init__(self, a: int):\n        self.a = a | GET # write to self.a (not self._a) because PAAM creates setters/getters/deleters *after* __init__ finishes\n\n\u003e\u003e\u003e obj = Test(15)\n\u003e\u003e\u003e obj.a\n\u003e\u003e\u003e 15\n\u003e\u003e\u003e obj.a = 5 # raises AttributeError: can't set attribute\n```\n\nProperty access modifiers can also be chained (order doesn't matter):\n\n```python\nfrom paam import SET, GET, DEL, PaamBase\n\nclass Test(PaamBase):\n    def __init__(self, a: int):\n        self.a = a | GET | SET\n\n\u003e\u003e\u003e obj = Test(15)\n\u003e\u003e\u003e obj.a\n\u003e\u003e\u003e 15\n\u003e\u003e\u003e obj.a = 5\n\u003e\u003e\u003e obj.a\n\u003e\u003e\u003e 5\n\u003e\u003e\u003e del obj.a # raises AttributeError: can't delete attribute\n```\n\n## Caveats (all planned to be fixed in future release)\n* The type of any variable \"annotated\" with `GET`, `SET`, or `DEL` is `_PropertyAccessModifierBase`. This means `mypy` support and IDE type hinting are most likely broken.\n* No tests\n* Error messages currently only show owner class\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa2435191%2Fpython-attribute-access-modifiers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa2435191%2Fpython-attribute-access-modifiers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa2435191%2Fpython-attribute-access-modifiers/lists"}