modelon/impact/client/entities.py
def download(self, path=None):
        """Downloads an FMU binary that is compiled.
        Returns the local path to the downloaded FMU archive.

        Parameters:

            path --
                The local path to store the downloaded FMU. Default: None.
                If no path is given, FMU will be downloaded in a temporary directory.

        Returns:

            path --
                Local path to the downloaded FMU.

        Example::

            fmu_path = model.compile().wait().download()
            fmu_path = model.compile().wait().download('C:/Downloads')
        """
        data = self._workspace_sal.fmu_download(self._workspace_id, self._fmu_id)
        if path is None:
            path = os.path.join(tempfile.gettempdir(), "impact-downloads")
        os.makedirs(path, exist_ok=True)
        fmu_path = os.path.join(path, self._fmu_id + ".fmu")
        with open(fmu_path, "wb") as f:
            f.write(data)
        return fmu_path
Downloads an FMU binary that is compiled.
        Returns the local path to the downloaded FMU archive.

        Parameters:

            path --
                The local path to store the downloaded FMU. Default: None.
                If no path is given, FMU will be downloaded in a temporary directory.

        Returns:

            path --
                Local path to the downloaded FMU.

        Example::

            fmu_path = model.compile().wait().download()
            fmu_path = model.compile().wait().download('C:/Downloads')
        
Downloads an FMU binary that is compiled.
Returns the local path to the downloaded FMU archive.
Downloads an FMU binary that is compiled . Returns the local path to the downloaded FMU archive .
def download(self, path=None):
        data = self._workspace_sal.fmu_download(self._workspace_id, self._fmu_id)
        if path is None:
            path = os.path.join(tempfile.gettempdir(), "impact-downloads")
        os.makedirs(path, exist_ok=True)
        fmu_path = os.path.join(path, self._fmu_id + ".fmu")
        with open(fmu_path, "wb") as f:
            f.write(data)
        return fmu_path
def download ( self , path = None ) : data = self . _workspace_sal . fmu_download ( self . _workspace_id , self . _fmu_id ) if path is None : path = os . path . join ( tempfile . gettempdir ( ) , "impact-downloads" ) os . makedirs ( path , exist_ok = True ) fmu_path = os . path . join ( path , self . _fmu_id + ".fmu" ) with open ( fmu_path , "wb" ) as f : f . write ( data ) return fmu_path
Downloads an FMU binary that is compiled.
Downloads an FMU binary that is compiled .
"""Downloads an FMU binary that is compiled.
        Returns the local path to the downloaded FMU archive.

        Parameters:

            path --
                The local path to store the downloaded FMU. Default: None.
                If no path is given, FMU will be downloaded in a temporary directory.

        Returns:

            path --
                Local path to the downloaded FMU.

        Example::

            fmu_path = model.compile().wait().download()
            fmu_path = model.compile().wait().download('C:/Downloads')
        """
path
Local path to the downloaded FMU.
path Local path to the downloaded FMU .
self
path
path 
        The local path to store the downloaded FMU. Default
None.
If no path is given, FMU will be downloaded in a temporary directory.
None . If no path is given FMU will be downloaded in a temporary directory .