KFactory 3.1.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.1.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.1.0.tar.gz | 1.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kfactory-3.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.0 MB
Release files / kfactory-3.1.0.tar.gz
| Download URL | kfactory-3.1.0.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9393ff2c6b1975f0b093755af58752e91be46f5ab7417307b7ee1c6e38f50d20
|
|
BLAKE2b-256 checksum How to use checksums |
1d2d85ae77ab71898678ff0528cd1b4ea3fdc1fc7aebc0291ee5e9b96f94b29d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.11 {"installer":{"name":"uv","version":"0.12.11","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.1.0-py3-none-any.whl
| Download URL | kfactory-3.1.0-py3-none-any.whl |
|---|---|
| Size | 293.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01135dc84274e6a0775ea7d5cb17315957a739a5a30746a067f267b0679ae9c7
|
|
BLAKE2b-256 checksum How to use checksums |
322e804b491f6984b30e0da5a2cf5c623a06cfaa8bbc71f5dabc4f7759d0721a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.11 {"installer":{"name":"uv","version":"0.12.11","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}
|