Metadata-Version: 2.4
Name: clsprop
Version: 1.4.0
Summary: 🏫 Just like @property but for classes 🏫
Author: Tom Ritchford
Author-email: Tom Ritchford <tom@swirly.com>
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Project-URL: Homepage, https://github.com/rec/clsprop
Project-URL: Repository, https://github.com/rec/clsprop
Project-URL: Documentation, https://rec.github.io/clsprop
Description-Content-Type: text/markdown

Works just like @property for classes, except deleters don't work (and are
perhaps impossible).

Inspired by https://stackoverflow.com/a/39542816/43839

## Example

    import clsprop

    class Full:
        _name = 'fool'

        @clsprop
        def name(cls):
            return cls._name

        @name.setter
        def name(cls, name):
            cls._name = name

        # Unfortunately, the deleter never gets called
        @name.deleter
        def name(cls, name):
            raise ValueError('Cannot delete name')

    assert Full.name == 'fool'

    Full.name = 'foll'
    assert Full.name == 'foll'

    del Full.name  # oh, well


### [API Documentation](https://rec.github.io/clsprop#clsprop--api-documentation)
