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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python_gdsii-0.2.3.tar.gz | 32.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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 logSecurity for python-gdsii 0.2.3
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for python_gdsii-0.2.3.tar.gz
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 logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.