PyEDB

raw JSON →
0.74.0 verified Fri May 01 auth: no python

PyEDB is a higher-level Pythonic interface to Ansys Electronics Data Base (EDB), enabling programmatic access to EDB databases for PCB/IC packaging design and simulation. Current version is 0.74.0, released under an active development cadence with monthly or bi-monthly releases.

pip install pyedb
error pyedb.exceptions.LicenseError: No valid license found for Electronics Desktop.
cause AEDT license server not reachable or no license available.
fix
Verify license server (set 'ANSYSLMD_LICENSE_FILE' or 'ANSYS_EM_DESKTOP_LIC' env var) or install/start a license manager.
error OSError: [WinError 2] The system cannot find the file specified
cause AEDT executable path not found or not installed.
fix
Set 'ANSYSEM_ROOT<version>' environment variable to the AEDT installation directory, e.g., 'ANSYSEM_ROOT241' for 2024 R1.
error AttributeError: 'Edb' object has no attribute 'open_layout'
cause Using an outdated code pattern from pyedb < 0.60. Open layout method was renamed.
fix
Use 'Edb.open_edb()' or 'Edb(edbpath=<path>)' to load an existing database. See documentation for layout-specific methods.
gotcha EDB requires a licensed Ansys AEDT installation or a running gRPC server. Without a valid license, operations will fail silently or raise obscure errors.
fix Ensure AEDT is installed and licensed. For remote connections, start the gRPC server using 'aedt -grpc'.
deprecated Direct use of 'pyedb.Edb' with 'edbversion' parameter may be deprecated in future releases in favor of environment-aware initialization.
fix Use 'Edb(edbpath=<path>)' without explicit version if environment variable 'ANSYSEM_VERSION' is set.
breaking In v0.69.0, the underlying gRPC API changed, breaking scripts that relied on internal 'edb.core' methods. Public API remains stable but low-level access is discouraged.
fix Use public methods only; avoid direct calls to 'edb.core.<something>'.

Opens an EDB database from a file path. Replace '2024.1' with your Ansys version.

import os
from pyedb import Edb

# Initialize EDB (requires an active AEDT installation or gRPC connection)
edb = Edb(edbpath=os.environ.get('EDB_PATH', ''), edbversion='2024.1')
print('EDB loaded:', edb)
edb.close()