The pyedb.misc.downloads library#
Summary#
Delete all downloaded examples to free space or update the files. |
|
List all files in a folder of the example-data repository. |
|
Download an example of AEDB File and return the def path. |
|
Download an example of WPF Project which allows to merge 2 aedb 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. |
|
Extract all files from a zip archive. |
Description#
Download example datasets from pyansys/example-data
Module detail#
- downloads.delete_downloads() None#
Delete all downloaded examples to free space or update the files.
Examples
>>> import pyedb.misc.downloads as downloads >>> downloads.delete_downloads()
- downloads.list_examples_files(folder) list#
List all files in a folder of the example-data repository.
- downloads.download_aedb(destination: str | None = None) str#
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:
- 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: bool = False, destination: str | None = None) str#
Download an example of WPF Project which allows to merge 2 aedb 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/PyAEDTExamples/wpf_edb_merge/merge_wizard.py'
- downloads.download_via_wizard(destination: str | None = None) str#
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:
- 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/viawizard_vacuum_FR4.aedt'
- downloads.download_touchstone(destination: str | None = None) str#
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:
- 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: str, filename: str | None = None, destination: str | None = None) str#
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("pyaedt/edb/ansys_interposer", "dummy_interposer_hbm.map") >>> path 'C:/Users/user/AppData/local/temp/PyAEDTExamples/pyaedt/edb/ansys_interposer/dummy_interposer_hbm.map'
- downloads.unzip(source_filename: str, dest_dir: str) None#
Extract all files from a zip archive.
- Parameters:
Examples
>>> import pyedb.misc.downloads as downloads >>> downloads.unzip("example.zip", "/path/to/destination")
- downloads.EXAMPLES_PATH#
- downloads.pyedb_logger#