pygeodesy.props

Package pygeodesy :: Module props |
[frames] | no frames]

# Module props

Mutable, immutable and caching/memoizing properties and deprecation decorators.

To enable `DeprecationWarning`s from `PyGeodesy`, set env var `PYGEODESY_WARNINGS` to a non-empty string AND run `python` with command line option `-X dev` or with one of the `-W` choices, see callable DeprecationWarnings below.

Version: 25.12.31

Classes
| Property_RO
| Property
| property_RO
| property_ROnce
| property_ROver
| DeprecationWarnings (INTERNAL) Handle `DeprecationWaring`s.

Functions
property_doc_(doc) Decorator for a standard `property` with basic documentation. |
deprecated_class(cls_or_class) Use inside __new__ or __init__ of a DEPRECATED class. |
deprecated_function(call) Decorator for a DEPRECATED function. |
deprecated_method(call) Decorator for a DEPRECATED method. |
deprecated_Property_RO(method) Decorator for a DEPRECATED Property_RO. |
deprecated_property_RO(method) Decorator for a DEPRECATED property_RO. |

Variables
| __all__ = `_ALL_LAZY.props`

Function Details

### property_doc_ (doc) |
Decorator for a standard `property` with basic documentation. Arguments: `doc` - The property documentation (`str`). Example: >>>class Clas(object): >>> >>> @property_doc_("documentation text.") >>> def name(self): >>> ... >>> >>> @name.setter >>> def name(self, value): >>> ...

### deprecated_class (cls_or_class) |
Use inside __new__ or __init__ of a DEPRECATED class. Arguments: `cls_or_class` - The class (`cls` or `Class`). Note: NOT a decorator!

### deprecated_function (call) |
Decorator for a DEPRECATED function. Arguments: `call` - The deprecated function (`callable`). Returns: The `call` DEPRECATED.

### deprecated_method (call) |
Decorator for a DEPRECATED method. Arguments: `call` - The deprecated method (`callable`). Returns: The `call` DEPRECATED.

### deprecated_Property_RO (method) |
Decorator for a DEPRECATED Property_RO. Arguments: `method` - The `Property_RO.fget` method (`callable`). Returns: The `method` DEPRECATED.

### deprecated_property_RO (method) |
Decorator for a DEPRECATED property_RO. Arguments: `method` - The `property_RO.fget` method (`callable`). Returns: The `method` DEPRECATED.