Metadata-Version: 2.4
Name: laylight
Version: 0.0.2
Summary: A Python library for photonic layout design
Keywords: gds,layout
Requires-Python: >3.10
Requires-Dist: klayout>=0.30.8
Requires-Dist: numpy
Requires-Dist: pydantic>=2.13.3
Requires-Dist: pyright>=1.1.409
Requires-Dist: scipy
Description-Content-Type: text/markdown

# laylight

`laylight` is a Python toolkit for photonic layout design. It helps engineers and researchers describe photonic structures in code, generate layout data with KLayout, and build repeatable design flows around reusable devices.

laylight is a sub-product of [PhotonStack](https://photonstack.io/), focused on making photonic design more programmable, composable, and easier to explore.

## Why laylight

Photonic layout work often mixes device geometry, parameter sweeps, custom scripts, and visualization. laylight provides a Python-first way to:

- define photonic structures with reusable building blocks
- generate layout data with a programmable workflow
- preview and iterate on designs more quickly than manual editing alone

## Documentation and tools

- Documentation: [laylight.photonstack.io](https://laylight.photonstack.io/)
- Playground: [laylight.photonstack.io/playground](https://laylight.photonstack.io/playground/)
- VS Code extension: [PhotonStack/laylight-vscode-extension](https://github.com/PhotonStack/laylight-vscode-extension)

## Installation

```bash
pip install laylight
```

## Simple example

```python
import laylight

from laylight.technology import Technology
from laylight.structure.wg import WGStraight

layout = laylight.Layout()
layout.dbu = 0.001
tech = Technology()
top = layout.create_cell("DEMO")

device = WGStraight(
    length=200,
    width=0.5,
    layout=layout,
    tech=tech,
)

laylight.Placer(device).into(top)
layout.write("demo.gds")
```

This creates a simple straight waveguide and writes the result to `demo.gds`.

## Learn more

For guided examples, API usage, and browser-based experiments, start with the documentation site and the online playground.

