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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_gdsii-0.2.3.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_gdsii-0.2.3-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file python_gdsii-0.2.3.tar.gz.

File metadata

  • Download URL: python_gdsii-0.2.3.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for python_gdsii-0.2.3.tar.gz
Algorithm Hash digest
SHA256 34dd11f767901295570dad7cea0aa73ac301b1f85752b8153249c3cda244c050
MD5 56ebde620619dfb0ebc9a0dce3b80f15
BLAKE2b-256 db57effc0529c0e57cb98ad96e660fcadbea669be2563cd7a88595ad03fb8ac4

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_gdsii-0.2.3.tar.gz:

Publisher: python.yaml on eugmes/python-gdsii

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_gdsii-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: python_gdsii-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for python_gdsii-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2cac3cad41882a747c0d883779182b9e7c066c095c8a96a9f31d5ef7a0194f
MD5 8b3a05ea84be7bbb17c14105d3ed0a2c
BLAKE2b-256 f0bdd514a3046b9502e5bf4443e69f05e0bb93e3ea416e1c2a0a20b511f23d2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_gdsii-0.2.3-py3-none-any.whl:

Publisher: python.yaml on eugmes/python-gdsii

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 files

0.2.1

1 file

0.2

1 file

0.1.1

1 file

0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page