GeoEco.Metadata.AddPropertyMetadata

GeoEco.Metadata.AddPropertyMetadata(prop, typeMetadata, shortDescription=None, longDescription=None, isExposedToPythonCallers=False, cls=None, module=None)

Creates a PropertyMetadata and for a class property adds it to a ClassMetadata.

Parameters:
  • prop (property or str) – The property object or name of the property. If the name is given, cls must also be given.

  • typeMetadata (GeoEco.Types.TypeMetadata) – A TypeMetadata that describes the data type and allowed values of the property.

  • shortDescription (str, optional) – One-line description of the property, ideally as plain text (but reStructuredText is OK).

  • longDescription (str, optional) – Detailed description of the property, formatted as reStructuredText.

  • isExposedToPythonCallers (bool, optional) – If True, the property should be part of GeoEco’s Public API. If False, the default, the property is considered part of GeoEco’s Internal API and not recommended for use by external callers.

  • cls (type or str, optional) – The class containing the property, either as the class itself or the unqualified name of the class (without module or package names). Only needed if prop is given as a name rather than a property object.

  • module (ModuleType or str, optional) – The module that contains the class, either as the module object itself or the fully qualified name of the module (a.k.a. dotted module name). If not provided, the caller’s module is used.

Note

Before calling this function, use AddClassMetadata() to create the ClassMetadata and add it to its module’s ModuleMetadata.