KFactory 3.4.0
KFactory is a Python framework for photonic and electronic chip layout, built on KLayout's C++ geometry engine. It provides parametric cells with caching, optical and electrical routing, enclosures via Minkowski sums, and schematic-driven design with LVS.
Key Features
- Cell caching — the
@kf.celldecorator deduplicates identical components automatically - Routing — optical and electrical bundle routing, Manhattan primitives, all-angle routing, and path-length matching
- Cross-sections & enclosures — define waveguide profiles and automatic boolean cladding layers via Minkowski sums
- Schematics — place-and-connect workflow with netlist extraction and layout-vs-schematic verification
- Virtual cells — hierarchical logical containers for schematic-driven design
- Dual coordinate systems —
KCell(integer DBU) andDKCell(float µm) work side by side - KLayout integration — full access to
kdb.Region,kdb.Polygon, DRC, and GDS/OASIS I/O - Jupyter & KLive — live preview in KLayout while editing notebooks
- PDK system — bundle layers, factories, cross-sections, and technology into reusable packages
Getting Started
Installation
KFactory is available on PyPI and requires Python 3.12+.
uv add kfactory
# or with pip
pip install kfactory
Development
just dev
This installs the development environment and sets up pre-commit hooks.
Ecosystem
| Package | Description |
|---|---|
| gdsfactory | Full-featured chip design framework — KFactory is its layout backend |
| kfnetlist | Standalone netlist extraction and generation |
Documentation
Full documentation is available at gdsfactory.github.io/kfactory.
Upgrading from an earlier version? See the migration guide.
License
Metadata
Release files for kfactory 3.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kfactory-3.4.0.tar.gz | 1.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kfactory-3.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.0 MB
Release files / kfactory-3.4.0.tar.gz
| Download URL | kfactory-3.4.0.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
586c3e66a53399bb780704a9ced9fd86ab3d4f24dcbae84ed5b7f5c75125c0e7
|
|
BLAKE2b-256 checksum How to use checksums |
67e0654554973673ec4c68939a1995c2d53088d7150f5b51c07d854b36678f13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kfactory-3.4.0-py3-none-any.whl
| Download URL | kfactory-3.4.0-py3-none-any.whl |
|---|---|
| Size | 301.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c669a74bc674209708d4cea628226e3e8a075058a140a0da622bb25c9797adc9
|
|
BLAKE2b-256 checksum How to use checksums |
5380c6f7819d5a27c43785fbae0b0699f0d6ec134480f7925e4ccdcb5e159b2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|