{"id":13736352,"url":"https://github.com/gdsfactory/klayout_pyxs","last_synced_at":"2026-02-24T08:52:12.831Z","repository":{"id":44387696,"uuid":"512175445","full_name":"gdsfactory/klayout_pyxs","owner":"gdsfactory","description":"Python port of xsection script for KLayout","archived":false,"fork":false,"pushed_at":"2023-12-01T09:03:54.000Z","size":2126,"stargazers_count":14,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-10T11:12:42.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://gdsfactory.github.io/klayout_pyxs/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dimapu/klayout_pyxs","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gdsfactory.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-07-09T12:04:29.000Z","updated_at":"2024-10-19T00:10:28.000Z","dependencies_parsed_at":"2024-01-24T22:02:50.655Z","dependency_job_id":"2d52517e-bb21-46d4-b292-0cd1fc0e7f63","html_url":"https://github.com/gdsfactory/klayout_pyxs","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/gdsfactory/klayout_pyxs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdsfactory%2Fklayout_pyxs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdsfactory%2Fklayout_pyxs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdsfactory%2Fklayout_pyxs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdsfactory%2Fklayout_pyxs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gdsfactory","download_url":"https://codeload.github.com/gdsfactory/klayout_pyxs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gdsfactory%2Fklayout_pyxs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29777159,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T04:54:30.205Z","status":"ssl_error","status_checked_at":"2026-02-24T04:53:58.628Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:01:20.264Z","updated_at":"2026-02-24T08:52:12.792Z","avatar_url":"https://github.com/gdsfactory.png","language":"Python","funding_links":[],"categories":["layout"],"sub_categories":[],"readme":"# klayout_pyxs 0.1.13\n\n[![docs](https://github.com/gdsfactory/klayout_pyxs/actions/workflows/pages.yml/badge.svg)](https://gdsfactory.github.io/klayout_pyxs/)\n[![pypi](https://img.shields.io/pypi/v/klayout_pyxs)](https://pypi.org/project/klayout_pyxs/)\n[![MIT](https://img.shields.io/github/license/gdsfactory/gdsfactory)](https://choosealicense.com/licenses/mit/)\n[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Downloads](https://pepy.tech/badge/klayout_pyxs)](https://pepy.tech/project/klayout_pyxs)\n[![Downloads](https://pepy.tech/badge/klayout_pyxs/month)](https://pepy.tech/project/klayout_pyxs)\n[![Downloads](https://pepy.tech/badge/klayout_pyxs/week)](https://pepy.tech/project/klayout_pyxs)\n\nThis is a python port of the XSection project\n(https://github.com/klayoutmatthias/xsection).\n\nThe goal of this project is to provide an add-on to KLayout (www.klayout.de) to\ncreate and visualize a realistic cross-section view for VLSI designs\nsupporting a wide range of technology options.\n\n## User Documentation\n\nFor the project description see [klayout_pyxs Project Home Page](https://gdsfactory.github.io/klayout_pyxs).\n\n\n## Project Files\n\nThe basic structure is:\n\n * `docs` The documentation\n * `klayout_pyxs` The python package sources\n * `pymacros` The python .lym macros files for KLayout\n * `samples` Some sample files\n * `tests` Test sources and golden data\n * `xs2pyxs` xs to pyxs conversion scripts\n\nThe `docs` folder contains the .rst files and images for the documentation\npages. See rendered version [here](https://klayout-pyxs.readthedocs.io/en/latest).\n\nThe `klayout_pyxs` folder contains the python package which includes\nthe cross-section generation engine.\n\nThe `pymacros` folder contains with the actual KLayout macros code,\n`pyxs.lym`.\n\nThe `samples` folder holds a few files for playing around.\n\nThe `tests` folder contains some regression tests for the package.\nTo run the tests, make sure \"klayout\" or \"klayout_app\" (in Windows)\nis in your path and use\n\n```sh\n$ cd tests\n$ ./run_tests.sh\n```\n\nor (from e.g. git bash console on Windows)\n\n```bash\n$ cd tests\n$ bash run_tests_windows.sh\n```\n\nThe `xs2pyxs` folder contains a shell script which helps converting\nRuby-based .xs scripts to .pyxs scripts. It performs necessary but not\nsufficient string replacements. Depending on the .xs script complexity,\nmore changes are likely to be needed.\n\n\n## Installation for users\n\nYou can install the module\n\n```\npip install klayout_pyxs\n```\n\nAnd the klayout macro from klayout package manager.\n\n![](https://i.imgur.com/0e1vAqW.png)\n\n## Installation for developers\n\nTo run .pyxs scripts from the KLayout menu, klayout_pyxs package and\npython macros file have to be installed to the KLayout folders.\nAccording to [KLayout documentation](https://www.klayout.de/doc-qt4/about/macro_editor.html),\nthey should go to the \"pymacros\" and \"python\" folders in KLayout's user\nspecific application folder. In Windows, it is $USERPROFILE/KLayout.\n\nIf you are using Python 2.7 in your KLayout distribution, you need\n`six` package installed.\n\n### Windows\n\nIn Windows, do the following (the commands should be run from e.g.\ngit bash console). Tested on KLayout 0.25.3 and 0.25.7.\n\n0. Check if $USERPROFILE/KLayout exists and is used by the KLayout to\nstore macros. Run\n\n    ```bash\n    $ ls $USERPROFILE/KLayout\n    ```\n\n    If no error reported, continue with 1. If there is an error, you need to\n    find a location of KLayout's user specific application folder\n    with pymacros, python folders and use it in further commands.\n\n1. Clone klayout_pyxs repository into any source folder:\n\n    ```bash\n    $ git clone https://github.com/dimapu/klayout_pyxs.git klayout_pyxs_repo\n    ```\n\n2. Copy klayout_pyxs_repo/pymacros/pyxs.lym to $USERPROFILE/KLayout/pymacros/pyxs.lym\n\n    ```bash\n    $ cp klayout_pyxs_repo/pymacros/pyxs.lym $USERPROFILE/KLayout/pymacros/pyxs.lym\n    ```\n\n3. Copy klayout_pyxs_repo/klayout_pyxs/*.* to $USERPROFILE/KLayout/python/klayout_pyxs\n\n    ```bash\n    $ mkdir $USERPROFILE/KLayout/python/klayout_pyxs\n    $ cp klayout_pyxs_repo/klayout_pyxs/*.py $USERPROFILE/KLayout/python/klayout_pyxs\n    ```\n\nNow, run Klayout. In the Tools menu, you should see pyxs \u003e Load pyxs script.\n\n### Linux / Mac OS\n\nRun\n\n```bash\n$ make install\n```\n\nNow, run Klayout. In the Tools menu, you should see pyxs \u003e Load pyxs script.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgdsfactory%2Fklayout_pyxs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgdsfactory%2Fklayout_pyxs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgdsfactory%2Fklayout_pyxs/lists"}