return a MapperProperty associated with the given key.
(
self, key: str, _configure_mappers: bool = False
)
| 2446 | return key in self._props |
| 2447 | |
| 2448 | def get_property( |
| 2449 | self, key: str, _configure_mappers: bool = False |
| 2450 | ) -> MapperProperty[Any]: |
| 2451 | """return a MapperProperty associated with the given key.""" |
| 2452 | |
| 2453 | if _configure_mappers: |
| 2454 | self._check_configure() |
| 2455 | |
| 2456 | try: |
| 2457 | return self._props[key] |
| 2458 | except KeyError as err: |
| 2459 | raise sa_exc.InvalidRequestError( |
| 2460 | f"Mapper '{self}' has no property '{key}'. If this property " |
| 2461 | "was indicated from other mappers or configure events, ensure " |
| 2462 | "registry.configure() has been called." |
| 2463 | ) from err |
| 2464 | |
| 2465 | def get_property_by_column( |
| 2466 | self, column: ColumnElement[_T] |