download_pyansys_example#

Session.download_pyansys_example(filename: str, directory: str | None = None, root: str | None = None, folder: bool | None = None) str#

Download an example dataset from the ansys/example-data repository. The dataset is downloaded local to the EnSight server location, so that it can be downloaded even if running from a container.

Parameters:
filename: str

The filename to download

directory: str

The directory to download the filename from

root: str

If set, the download will happen from another location

folder: bool

If set to True, it marks the filename to be a directory rather than a single file

Returns:
pathname: str

The download location, local to the EnSight server directory. If folder is set to True, the download location will be a folder containing all the items available in the repository location under that folder.

Examples

>>> from ansys.pyensight.core import DockerLauncher
>>> session = DockerLauncher().start(data_directory="D:\")
>>> cas_file = session.download_pyansys_example("mixing_elbow.cas.h5","pyfluent/mixing_elbow")
>>> dat_file = session.download_pyansys_example("mixing_elbow.dat.h5","pyfluent/mixing_elbow")
>>> session.load_data(cas_file, result_file=dat_file)
>>> remote = session.show("remote")
>>> remote.browser()