The pyedb.misc.downloads library#
Summary#
Delete all downloaded examples to free space or update the files. |
|
Download an example of AEDB File and return the def path. |
|
Download an example of WPF Project which allows to merge 2aedb files. |
|
Download an example of Hfss Via Wizard and return the def path. |
|
Download an example of touchstone File and return the def path. |
|
Download file from directory. |
|
Description#
Download example datasets from pyansys/example-data
Module detail#
- downloads.delete_downloads()#
Delete all downloaded examples to free space or update the files.
- downloads.download_aedb(destination=None)#
Download an example of AEDB File and return the def path.
Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.
- Parameters:
- destination
str,optional Path for downloading files. The default is the user’s temp folder.
- destination
- Returns:
strPath to the example file.
Examples
Download an example result file and return the path of the file. >>> import pyedb.misc.downloads >>> path = pyedb.misc.downloads.download_aedb() >>> path ‘C:/Users/user/AppData/local/temp/Galileo.aedb’
- downloads.download_edb_merge_utility(force_download=False, destination=None)#
Download an example of WPF Project which allows to merge 2aedb files.
Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.
- Parameters:
- Returns:
strPath to the example file.
Examples
Download an example result file and return the path of the file. >>> import pyedb.misc.downloads >>> path = pyedb.misc.downloads.download_edb_merge_utility(force_download=True) >>> path ‘C:/Users/user/AppData/local/temp/wpf_edb_merge/merge_wizard.py’
- downloads.download_via_wizard(destination=None)#
Download an example of Hfss Via Wizard and return the def path.
Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.
- Parameters:
- destination
str,optional Path for downloading files. The default is the user’s temp folder.
- destination
- Returns:
strPath to the example file.
Examples
Download an example result file and return the path of the file.
>>> import pyedb.misc.downloads >>> path = pyedb.misc.downloads.download_via_wizard() >>> path 'C:/Users/user/AppData/local/temp/pyaedtexamples/Graphic_Card.aedt'
- downloads.download_touchstone(destination=None)#
Download an example of touchstone File and return the def path.
Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.
- Parameters:
- destination
str,optional Path for downloading files. The default is the user’s temp folder.
- destination
- Returns:
strPath to the example file.
Examples
Download an example result file and return the path of the file. >>> import pyedb.misc.downloads >>> path = pyedb.misc.downloads.download_touchstone() >>> path ‘C:/Users/user/AppData/local/temp/pyaedtexamples/ssn_ssn.s6p’
- downloads.download_file(directory, filename=None, destination=None)#
Download file from directory.
Files are downloaded to a destination. If filename is not specified, the full directory will be downloaded.
- Parameters:
- Returns:
strPath to the example file.
Examples
Download an example result file and return the path of the file.
>>> import pyedb.misc.downloads >>> path = pyedb.misc.downloads.download_file("motorcad", "IPM_Vweb_Hairpin.mot") >>> path 'C:/Users/user/AppData/local/temp/PyAEDTExamples/motorcad'
- downloads.unzip(source_filename, dest_dir)#
- downloads.EXAMPLE_REPO = 'https://github.com/ansys/example-data/raw/main/'#
- downloads.EXAMPLES_PATH#
- downloads.tmpfold#