diff --git a/src/ifcopenshell-python/ifcopenshell/sql.py b/src/ifcopenshell-python/ifcopenshell/sql.py index 0d2e5281d0..e0701cf8ed 100644 --- a/src/ifcopenshell-python/ifcopenshell/sql.py +++ b/src/ifcopenshell-python/ifcopenshell/sql.py @@ -18,6 +18,7 @@ from __future__ import annotations import re import json +import types import numpy as np import numpy.typing as npt import ifcopenshell @@ -316,6 +317,14 @@ class sqlite(file): # The best option we've got for mimicing `file.schema_identifier`. return self._schema + @property + def header(self) -> types.SimpleNamespace: + # Mimicking `file_header` object from `ifcopenshell.file`. + header = types.SimpleNamespace( + file_description=types.SimpleNamespace(description=(self.mvd_str,)), + ) + return header + class sqlite_entity(entity_instance): sqlite_wrapper: sqlite_wrapper diff --git a/src/ifcopenshell-python/ifcopenshell/stream.py b/src/ifcopenshell-python/ifcopenshell/stream.py index fdade150be..655dc2d9cd 100644 --- a/src/ifcopenshell-python/ifcopenshell/stream.py +++ b/src/ifcopenshell-python/ifcopenshell/stream.py @@ -294,6 +294,10 @@ try: f"No `wrapped_data` for {class_name}. `ifcopenshell.{class_name}` is probably confused with `ifcopenshell.file`." ) + @property + def header(self) -> NoReturn: + raise NotImplementedError("`stream.header` is not implemented yet.") + @property def schema(self) -> ifcopenshell.util.schema.IFC_SCHEMA: return self._schema