Ansys EDB Core

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

A Python wrapper for the Ansys EDB (Electronics Database) service, providing access to EDB primitives, layout, and simulation data. Current stable version is 0.3.1, with pre-release versions up to 0.4.0.dev1. The library is under active development with frequent releases.

pip install ansys-edb-core
error ImportError: cannot import name 'EdbHandler' from 'ansys.edb'
cause Top-level import path changed in v0.3.0.
fix
Use: from ansys.edb.core import EdbHandler
error grpc.RpcError: [StatusCode.UNAVAILABLE] failed to connect to all addresses
cause EDB gRPC service is not running or unreachable.
fix
Start the EDB service (e.g., via Ansys Electronics Desktop) and ensure the host/port matches.
error AttributeError: 'EdbHandler' object has no attribute 'get_cell_by_name'
cause Method renamed or removed in newer version.
fix
Use property access: cell = edb.cells[0] or iterate over edb.cells.
breaking In v0.3.0, the top-level module structure was reorganized: many classes moved from `ansys.edb.core` to submodules like `layout`, `cell`, `net`. Direct imports from `ansys.edb.core` may break.
fix Use imports from the correct submodules (e.g., `from ansys.edb.core.layout import Cell`)
breaking The `EdbHandler` class was moved to `ansys.edb.core` in v0.3.0; previously it was at `ansys.edb`. Old import will raise ImportError.
fix Change import to `from ansys.edb.core import EdbHandler`
gotcha The library requires an external EDB service (gRPC server) running on a specific port. Connecting without the service results in `grpc.RpcError`.
fix Ensure the EDB service is started before using the library. See https://github.com/ansys/pyedb-core for instructions.
deprecated Methods like `get_cell_by_name()` are replaced by property-based access (e.g., `edb.cells`).
fix Use `edb.cells` or `edb.get_cell_by_name()` is deprecated; prefer `edb.cells`.

Connect to EDB service and open a database.

import os
from ansys.edb.core import EdbHandler

# Connect to EDB service (requires EDB service running)
edb = EdbHandler()
edb.connect()

# Open an existing EDB database
edb_db_path = os.environ.get('EDB_DB_PATH', '')
edb.open(edb_db_path)

# Print cell names
for cell in edb.cells:
    print(cell.name)

edb.close()