gdsfactory
python library to generate GDS layouts
What it is and what it does
GDSFactory is a Python library that turns hardware design into code. You write parametric Python functions to define chip components, and the library generates fabrication-ready CAD files (GDS, OASIS, STL, GERBER). It's built for photonics, analog, quantum, MEMS, and PCB design, and integrates with simulators (Ansys, Lumerical, Tidy3d, MEEP, SPICE) to let you test and verify layouts without leaving Python.
The library handles the full design flow: layout generation with parametric cells, design verification (DRC, LVS, DFM), simulation integration, and post-fabrication validation. It wraps KLayout's C++ backend for fast geometric operations and ships with open-source PDKs (Cornerstone, SiEPIC, SkyWater 130nm, GlobalFoundries 180nm) plus access to foundry PDKs under NDA via a commercial subscription. Active development, widely used in industry and academia for tape-outs.
Use it for:
- Design photonic integrated circuits by writing Python functions that generate parametric cell layouts, then export to GDS for fabrication.
- Run circuit and device simulations directly from your layout using integrated interfaces to Ansys, Lumerical, or open-source solvers.
- Verify complex layouts against design intent using DRC, LVS, and DFM checks before sending to the foundry.
- Version-control entire chip designs and component libraries in Git, treating layout as code.
- Conduct post-fabrication data analysis by defining test protocols alongside layout and extracting component parameters from raw measurements.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
GDSFactory generates CAD files (GDS, OASIS, STL, GERBER) from Python code for designing photonic chips, analog circuits, quantum devices, MEMS, PCBs, and 3D-printable objects.
Yes, if you are designing photonic, analog, quantum, or MEMS chips and want a scriptable, open-source EDA flow. The library is actively maintained, has low install friction, integrates with major simulators, and comes with open PDKs. Caveat: license terms are unclear in the metadata—verify the actual license before committing to commercial use. The large dependency tree (32 packages including scipy, scikit-image, trimesh) means first install and import will be slow.
Install
gdsfactory on PyPI
pip
pip install gdsfactoryuv
uv add gdsfactorypoetry
poetry add gdsfactoryInstalling gdsfactory
Before you install
Low install friction; pure Python wheel. Active maintenance with release 2 days old. Supports current Python versions (3.12–3.14). Depends on 32 runtime packages including heavy scientific stacks (scipy, scikit-image, trimesh, networkx) and visualization (matplotlib, pyglet), so initial install and first import may take time.
License in practice
License treatment is unclear—no SPDX identifier or raw license text in metadata. Before adopting for commercial or proprietary work, verify the actual license terms in the repository or package documentation.
Quickstart
pip install gdsfactory
import gdsfactory as gf
gf.gpdk.PDK.activate()
c = gf.Component()
r = gf.components.rectangle(size=(10, 10), layer=(1, 0))
rect = c.add_ref(r)
c.show()
Requires Python 3.12–3.14; heavy dependency tree (scipy, scikit-image, trimesh, networkx, matplotlib, pyglet) may need system libraries for graphics and geometry computation.
Verify before relying
- Whether the unclear license permits commercial or proprietary use without restrictions.
- Whether all 32 runtime dependencies install cleanly on all supported platforms without system-level prerequisites.
- Performance characteristics and memory footprint when working with large GDS files or complex designs.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (<3.15,>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 32 — jinja2, loguru, matplotlib, numpy, orjson, pandas, pydantic, pydantic-settings, pydantic-extra-types, pyyaml, qrcode, rectpack, rich, scipy, shapely, toolz, types-PyYAML, typer, kfactory, watchdog, freetype-py, mapbox_earcut, networkx, scikit-image, trimesh, ipykernel, attrs, graphviz, pyglet, typing-extensions |
| Maintenance | actively maintained — 2 days since the last release |
| First released | |
| Downloads | 297,536/month — #7,883 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gdsfactory-9.48.0-py3-none-any.whl
Keywords: eda, photonics, python
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
gdsfactoryplusGDSFactory+ extends the GDSFactory library with…
unclear · top 15,000 on PyPI
gdstkGdstk is a Python module for creating and…
unclear · top 15,000 on PyPI
gpluginsGplugins provides a plugin system for…
unclear · top 15,000 on PyPI
kfactoryKFactory is a Python framework for designing…
unclear · top 15,000 on PyPI
elvis-lvsElvis extracts connectivity from GDS layout…
unclear · top 15,000 on PyPI
lambdapdkLambdapdk provides pre-configured, open-source…
permissive · top 5,000 on PyPI
klayoutKLayout is a Python package for layout viewing,…
copyleft · top 15,000 on PyPI
kwasmkwasm bundles KLayout's WebAssembly-compiled…
copyleft · top 15,000 on PyPI
saxSAX is a JAX-based simulator and optimizer for…
permissive · top 15,000 on PyPI
dvsimDVSim is a Python-based build and run system…
permissive · top 15,000 on PyPI