Open a Web GUI Project in Python
From PhotonForge 2.2, the web GUI shows your projects, but you cannot edit them there. To edit a project, load it in Python and show it in the local GUI.
In this notebook, you will learn how to:
- Find a web GUI project by its name.
- Load the project in Python.
- Show a component of the project in the local GUI.
- Save your changes to the project.
You need PhotonForge 2.2 or newer and your Tidy3D API key (tidy3d configure).
To install PhotonForge, see Installation.
1. Your project in the web GUI
Section titled “1. Your project in the web GUI”The Projects page of the web GUI lists your projects. This notebook uses the project LiveViewer edit demo.

Click the project. The Components tab shows the components of the project.

Click a component. The Overview tab shows its schematic and its layout. You can look at them, but you cannot edit them.

Remember the name of the project. You use it in step 3.
2. Connect to your projects
Section titled “2. Connect to your projects”Import the PDA module and the local GUI. pda.init connects to your projects with your Tidy3D API key.
import photonforge.pda as pdafrom photonforge.live_viewer import LiveViewer
pda.init()If pda.init() fails with CERTIFICATE_VERIFY_FAILED on macOS, your Python from python.org does not have its root certificates yet.
To install them, run the Install Certificates.command that is in the folder of your Python version in Applications:
open "/Applications/Python 3.12/Install Certificates.command"Change 3.12 to your Python version, then restart the notebook kernel.
For more information, see Installation steps in the Python documentation.
3. Find your project
Section titled “3. Find your project”Put the name of your project in PROJECT_NAME.
pda.list_projects lists the projects that you can open.
It opens each project to read its name, so it takes approximately 0.3 s for each project.
PROJECT_NAME = "LiveViewer edit demo"
projects = pda.list_projects()
# Keep the projects with this namematches = [p for p in projects if p["name"] == PROJECT_NAME]if not matches: raise ValueError(f"No project has the name {PROJECT_NAME!r}")
for p in matches: print(p["createdAt"][:10], p["documentId"])2026-11-23 32ME6QdFduCK7TacvwnVAcNpGNzw4. Load the project
Section titled “4. Load the project”Two projects can have the same name. This code loads the newest one with pda.load_project.
newest = max(matches, key=lambda p: p["createdAt"])project = pda.load_project(project_id=newest["documentId"])
# Show the names of the components in the projectlist(project.components(origin="self"))['Coupler', 'MZI', 'Straight 20 um']load_project sets the technology of the project as the default technology.
It also writes the Python code of the project in a pflibs folder in the working directory.
A schematic that you saved in the old web GUI is a component of the project.
The old web GUI gave it the name Component if you did not change the name.
A schematic that you did not save is not in this list.
5. Show a component in the local GUI
Section titled “5. Show a component in the local GUI”Project.component gets a component by its name. The local GUI runs on your computer, not in the cloud.
# Use a name from the list abovecomponent = project.component("MZI")
# Start the local GUI on port 8841 and show the componentviewer = LiveViewer(port=8841)viewer(component)LiveViewer started at http://127.0.0.1:8841. Call its 'stop()' method to free the port.Open http://localhost:8841 in your browser. To edit the component in the local GUI, see Quick Start I: Local GUI.
6. Save your changes
Section titled “6. Save your changes”The local GUI changes component in your Python session.
Project.update saves it to the project, and the web GUI shows the changes.
CAUTION: project.update writes your copy of the component over the copy in the project.
If a teammate saved the same component after you loaded the project, their changes are lost.
project.update(viewer.component)print("Saved", viewer.component.name)Saved MZI7. Close the connections
Section titled “7. Close the connections”viewer.stop()pda.stop()LiveViewer stopped; port 8841 is free.Next steps
Section titled “Next steps”- Quick Start I: Local GUI builds and edits a circuit in the local GUI.
- Photonic Design Automation shows versions, libraries and how to share a project.