Model.export#
- Model.export(path, use_slots=True, locked_spaces=None)[source]#
Export the model as a Python package.
This method performs the
export_model()on self. Seeexport_model()section for the details, including the limitations of the export.- Parameters:
path – The path where the generated Python package will be located.
use_slots (
bool, optional) – Whether the generated Space classes declare__slots__. Defaults toTrue. Seeexport_model().locked_spaces (optional) – Spaces to export with a lock, so that several threads can share them on a free-threaded build of Python. An iterable of Space names relative to the model (
"Parent.Child"for a nested Space) or Space objects; each listed Space is locked together with the Spaces below it. Defaults toNone, which locks no Space. Seeexport_model().
Added in version 0.22.0.
Changed in version 0.33.0: The
use_slotsandlocked_spacesparameters are added, and the generated Space classes declare__slots__by default.