Resource Objects

class app.models.AbstractResource(*, id: int | None = None, added: datetime | None = None, updated: datetime | None = None, deprecated: datetime | None = None, deprecation_reason: str | None = None, destroyed: datetime | None = None, **kwargs: Any)
added: Mapped[datetime] = <sqlalchemy.orm.properties.MappedColumn object>
abstract property brn: BRN
classmethod csv_header() List[str]
csv_row() List[datetime | bool | int | str]
deprecate(*, reason: str, meta: Dict[str, Any] | None = None) bool

Marks the resource as deprecated. In the event that the resource was already deprecated, no change will be recorded and the function will return False.

Parameters:
  • reason – an opaque string that records the deprecation reason

  • meta – metadata associated with the deprecation reason, such as the circumstances in which censorship was detected

Returns:

if the proxy was deprecated

deprecated: Mapped[datetime | None] = <sqlalchemy.orm.properties.MappedColumn object>
deprecation_reason: Mapped[str | None]
property deprecations: List[Deprecation]
destroy() None

Marks the resource for destruction.

Returns:

None

destroyed: Mapped[datetime | None] = <sqlalchemy.orm.properties.MappedColumn object>
id: Mapped[int] = <sqlalchemy.orm.properties.MappedColumn object>
updated: Mapped[datetime] = <sqlalchemy.orm.properties.MappedColumn object>