The ``pyedb.misc.downloads`` library ==================================== .. py:module:: pyedb.misc.downloads Summary ------- .. py:currentmodule:: downloads .. tab-set:: .. tab-item:: Functions .. list-table:: :header-rows: 0 :widths: auto * - :py:obj:`~delete_downloads` - Delete all downloaded examples to free space or update the files. * - :py:obj:`~download_aedb` - Download an example of AEDB File and return the def path. * - :py:obj:`~download_edb_merge_utility` - Download an example of WPF Project which allows to merge 2aedb files. * - :py:obj:`~download_via_wizard` - Download an example of Hfss Via Wizard and return the def path. * - :py:obj:`~download_touchstone` - Download an example of touchstone File and return the def path. * - :py:obj:`~download_file` - Download file from directory. * - :py:obj:`~unzip` - .. tab-item:: Attributes .. list-table:: :header-rows: 0 :widths: auto * - :py:obj:`~tmpfold` - .. tab-item:: Constants .. list-table:: :header-rows: 0 :widths: auto * - :py:obj:`~EXAMPLE_REPO` - * - :py:obj:`~EXAMPLES_PATH` - Description ----------- Download example datasets from https://github.com/pyansys/example-data .. !! processed by numpydoc !! Module detail ------------- .. py:function:: delete_downloads() Delete all downloaded examples to free space or update the files. .. !! processed by numpydoc !! .. py:function:: 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** : :class:`python:str`, :obj:`optional` Path for downloading files. The default is the user's temp folder. :Returns: :class:`python:str` Path to the example file. .. rubric:: 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' .. !! processed by numpydoc !! .. py:function:: 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: **force_download** : :ref:`bool ` Force to delete cache and download files again. **destination** : :class:`python:str`, :obj:`optional` Path for downloading files. The default is the user's temp folder. :Returns: :class:`python:str` Path to the example file. .. rubric:: 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' .. !! processed by numpydoc !! .. py:function:: 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** : :class:`python:str`, :obj:`optional` Path for downloading files. The default is the user's temp folder. :Returns: :class:`python:str` Path to the example file. .. rubric:: 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' .. !! processed by numpydoc !! .. py:function:: 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** : :class:`python:str`, :obj:`optional` Path for downloading files. The default is the user's temp folder. :Returns: :class:`python:str` Path to the example file. .. rubric:: 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' .. !! processed by numpydoc !! .. py:function:: 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: **directory** : :class:`python:str` Directory name. **filename** : :class:`python:str`, :obj:`optional` File name to download. The default is all files inside directory. **destination** : :class:`python:str`, :obj:`optional` Path where files will be downloaded. Default is user temp folder. :Returns: :class:`python:str` Path to the example file. .. rubric:: 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' .. !! processed by numpydoc !! .. py:function:: unzip(source_filename, dest_dir) .. py:data:: EXAMPLE_REPO :value: 'https://github.com/ansys/example-data/raw/main/' .. py:data:: EXAMPLES_PATH .. py:data:: tmpfold