KFactory 3.2.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.2.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.2.0.tar.gz | 1.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kfactory-3.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.0 MB
Release files / kfactory-3.2.0.tar.gz
| Download URL | kfactory-3.2.0.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
388ca1c97117ef174d1f44bb5628e089924e37a68514f7694e23200586ab3ee0
|
|
BLAKE2b-256 checksum How to use checksums |
2d55292cd7b3560f668953e990592adcd2e9e8082bfd6a16c170c71cc03f7909
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","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.2.0-py3-none-any.whl
| Download URL | kfactory-3.2.0-py3-none-any.whl |
|---|---|
| Size | 297.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4ebe0a7167acd069667d32e3ae434da74ebddca26292ad10c2e94eeb887767c
|
|
BLAKE2b-256 checksum How to use checksums |
7b4eff5aeda08d19dc205a2bed2ab699943aef3da6813306cda9e7cfdc4b52ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","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}
|