Skip to main content

python-gdsii is a library that can be used to read, create, modify and save GDSII files. It supports both low-level record I/O and high level interface to GDSII libraries (databases), structures, and elements.

This package also includes scripts that can be used to convert binary GDS file to a simple text format (gds2txt), YAML (gds2yaml), and from text fromat back to GDSII (txt2gds).

Usage

For most cases interface provided by Library class from gdsii.library should be enough. Here is a small example:

from gdsii.library import Library
from gdsii.elements import *

# read a library from a file
with open('file.gds', 'rb') as stream:
    lib = Library.load(stream)

# let's move the first structure to a new library
new_lib = Library(5, b'NEWLIB.DB', 1e-9, 0.001)
struc = lib.pop(0) # libraries and structures are derived from list class
new_lib.append(struc)

# let's also add some elements...
# Note: first and last points in the boundary should be the same
#       this is required by GDSII spec.
struc.append(Boundary(45, 0, [(-100000, -100000), (-100000, 0), (0,0), (0, -100000), (-100000, -100000)]))

# Save both files with different names...
with open('newfile1.gds', 'wb') as stream:
    lib.save(stream)

with open('newfile2.gds', 'wb') as stream:
    new_lib.save(stream)

Metadata

Release files for python-gdsii 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-gdsii 0.2.3
File Size Uploaded
python_gdsii-0.2.3.tar.gz 32.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-gdsii 0.2.3
File Interpreter ABI Platform
python_gdsii-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 57.7 kB

Release files / python_gdsii-0.2.3.tar.gz

Download URL python_gdsii-0.2.3.tar.gz
Size 32.2 kB
Tags Source
SHA-256 checksum
How to use checksums
34dd11f767901295570dad7cea0aa73ac301b1f85752b8153249c3cda244c050
BLAKE2b-256 checksum
How to use checksums
db57effc0529c0e57cb98ad96e660fcadbea669be2563cd7a88595ad03fb8ac4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release files / python_gdsii-0.2.3-py3-none-any.whl

Download URL python_gdsii-0.2.3-py3-none-any.whl
Size 25.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc2cac3cad41882a747c0d883779182b9e7c066c095c8a96a9f31d5ef7a0194f
BLAKE2b-256 checksum
How to use checksums
f0bdd514a3046b9502e5bf4443e69f05e0bb93e3ea416e1c2a0a20b511f23d2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 13, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.1

1 release file

0.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page