{"id":17787928,"url":"https://github.com/zmievsa/cached_classproperty","last_synced_at":"2026-03-14T20:37:12.288Z","repository":{"id":200805277,"uuid":"609552556","full_name":"zmievsa/cached_classproperty","owner":"zmievsa","description":"cached_property for class properties instead of instance properties","archived":false,"fork":false,"pushed_at":"2024-04-15T21:38:02.000Z","size":33,"stargazers_count":7,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T05:55:54.737Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zmievsa.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}},"created_at":"2023-03-04T14:25:15.000Z","updated_at":"2024-03-06T09:02:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"81fb29de-5aca-41a9-9ed9-b7f5eb7961ec","html_url":"https://github.com/zmievsa/cached_classproperty","commit_stats":null,"previous_names":["ovsyanka83/cached_classproperty","zmievsa/cached_classproperty"],"tags_count":0,"template":false,"template_full_name":"zmievsa/python-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmievsa%2Fcached_classproperty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmievsa%2Fcached_classproperty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmievsa%2Fcached_classproperty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmievsa%2Fcached_classproperty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmievsa","download_url":"https://codeload.github.com/zmievsa/cached_classproperty/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806070,"owners_count":20350775,"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":[],"created_at":"2024-10-27T10:13:23.333Z","updated_at":"2026-03-14T20:37:07.251Z","avatar_url":"https://github.com/zmievsa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cached_classproperty\n\ncached_property for class properties instead of instance properties\n\n---\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/zmievsa/cached_classproperty/actions?query=workflow%3ATests+event%3Apush+branch%3Amain\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/zmievsa/cached_classproperty/actions/workflows/test.yaml/badge.svg?branch=main\u0026event=push\" alt=\"Test\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/ovsyanka83/cached_classproperty\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/codecov/c/github/ovsyanka83/cached_classproperty?color=%2334D058\" alt=\"Coverage\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/cached_classproperty/\" target=\"_blank\"\u003e\n    \u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/cached_classproperty?color=%2334D058\u0026label=pypi%20package\" alt=\"Package version\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/cached_classproperty/\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/pyversions/cached_classproperty?color=%2334D058\" alt=\"Supported Python versions\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\n```bash\npip install cached_classproperty\n```\n\n## Usage\n\nSimilarly to `functools.cached_property`, these properties get executed exactly once on access.\n\n```python\nfrom cached_classproperty import cached_staticproperty, cached_classproperty\n\nclass Foo:\n    @cached_staticproperty\n    def my_staticproperty():\n        ...\n\n    @cached_classproperty\n    def my_classproperty(cls):\n        ...\n```\n\n`cached_classproperty` can be inherited and can re-execute for every inherited class just like `cached_property`. `cached_staticproperty`, on the other hand, executes exactly once even if inherited. It is also lighter and faster than `cached_classproperty`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmievsa%2Fcached_classproperty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmievsa%2Fcached_classproperty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmievsa%2Fcached_classproperty/lists"}