download_pyansys_example#

LibUserd.download_pyansys_example(filename: str, directory: str | None = None, root: str | None = None, folder: bool = False) 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 libuserd
>>> l = libuserd.LibUserd()
>>> cas_file = l.download_pyansys_example("mixing_elbow.cas.h5","pyfluent/mixing_elbow")
>>> dat_file = l.download_pyansys_example("mixing_elbow.dat.h5","pyfluent/mixing_elbow")