Examples#

Examples in the form of Jupyter notebooks demonstrate API usage. To run these notebooks, perform these steps:

  1. Create and activate a Python virtual environment:

       python -m venv .venv
       .venv\Scripts\activate.bat
    
    For more information on creating and installing a virtual environment, see
    :ref:`dev_install`.
    
  2. Ensure that you have the latest version of pip:

    python -m pip install -U pip
    
  3. Build and install the ansys-edb and ansys-api packages:

    python -m pip install -e .
    
  4. Install Jupyter notebook requirements:

    python -m pip install .[notebook]
    
  5. Install the IPython kernel:

    ipython kernel install --user --name=.venv
    
  6. Launch Juptyer notebook:

    jupyter-notebook
    
  1. Navigate to desired notebook example, change the kernel to the virtual environment, and execute the notebook with the desired settings.