download_file#

pytwin.download_file(file_name, directory, force_download=False, destination=None)#

Download an example data file. Examples files are downloaded to a persistent cache to avoid downloading the same file twice.

Parameters:
file_namestr

Path of the file in the examples folder.

directorystr

Subfolder storing the input file

force_downloadbool, optional

Force to delete file and download file again. Default value is False.

destinationstr, optional

Path to download files to. The default is the user’s temporary folder.

Returns:
str

Path to the downloaded file.

Examples

>>> from pytwin import examples
>>> path = examples.download_file("CoupledClutches_23R1_other.twin", "twin_files", force_download=True)