{"library":"property-manager","title":"Property Manager","description":"The `property-manager` package, currently at version 3.0, provides useful property variants for Python programming, extending Python's built-in `property` descriptor. It offers decorators for creating required properties, writable properties, and cached properties, as well as a `PropertyManager` base class with enhanced constructor behavior and `repr()` customization. The library has a stable release cadence, with version 3.0 released in 2020, and is designed to make managing class attributes more robust and flexible.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install property-manager"],"cli":null},"imports":["from property_manager import PropertyManager","from property_manager import writable_property","from property_manager import required_property","from property_manager import cached_property"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from property_manager import PropertyManager, required_property, writable_property, cached_property\nimport random\n\nclass MyManagedObject(PropertyManager):\n    @required_property\n    def name(self):\n        \"\"\"A name that must be provided during initialization.\"\"\"\n        pass\n\n    @writable_property\n    def value(self):\n        \"\"\"A writable property with a computed default.\"\"\"\n        return random.randint(1, 100)\n\n    @cached_property\n    def expensive_calculation(self):\n        \"\"\"A property whose value is computed once and cached.\"\"\"\n        print(\"Calculating expensive_calculation...\")\n        return sum(range(self.value * 1000))\n\n# Instantiate with a required property\nobj = MyManagedObject(name=\"Example Item\")\n\n# Access writable property (gets default initially)\nprint(f\"Initial value: {obj.value}\")\n\n# Set writable property\nobj.value = 200\nprint(f\"New value: {obj.value}\")\n\n# Access cached property (computes once)\nprint(f\"Expensive calculation (first access): {obj.expensive_calculation}\")\nprint(f\"Expensive calculation (second access): {obj.expensive_calculation}\")\n\n# Attempt to create an object without a required property\ntry:\n    MyManagedObject()\nexcept TypeError as e:\n    print(f\"Caught expected error: {e}\")","lang":"python","description":"This example demonstrates defining a class using `PropertyManager` with `required_property`, `writable_property`, and `cached_property`. It shows how required properties are enforced at instantiation, how writable properties can have computed defaults and be assigned new values, and how cached properties compute their value only once upon first access.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"3.0","pypi_latest":"3.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":1.7,"avg_import_s":0.1,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"property-manager","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.1,"mem_mb":2.7,"disk_size":"18.6M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"property-manager","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.9,"import_time_s":0.09,"mem_mb":2.7,"disk_size":"19M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"property-manager","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.13,"mem_mb":3,"disk_size":"20.6M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"property-manager","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.6,"import_time_s":0.11,"mem_mb":3,"disk_size":"21M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"property-manager","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.1,"mem_mb":2.9,"disk_size":"12.4M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"property-manager","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.6,"import_time_s":0.11,"mem_mb":2.9,"disk_size":"13M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"property-manager","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.11,"mem_mb":3.5,"disk_size":"12.2M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"property-manager","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.5,"import_time_s":0.11,"mem_mb":3.3,"disk_size":"13M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"property-manager","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.05,"mem_mb":2.6,"disk_size":"18.1M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"property-manager","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.9,"import_time_s":0.05,"mem_mb":2.6,"disk_size":"19M"}]}}