GDSII manipulation library
Project description
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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34dd11f767901295570dad7cea0aa73ac301b1f85752b8153249c3cda244c050
|
|
| MD5 |
56ebde620619dfb0ebc9a0dce3b80f15
|
|
| BLAKE2b-256 |
db57effc0529c0e57cb98ad96e660fcadbea669be2563cd7a88595ad03fb8ac4
|
Provenance
The following attestation bundles were made for python_gdsii-0.2.3.tar.gz:
Publisher:
python.yaml on eugmes/python-gdsii
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_gdsii-0.2.3.tar.gz -
Subject digest:
34dd11f767901295570dad7cea0aa73ac301b1f85752b8153249c3cda244c050 - Sigstore transparency entry: 763404487
- Sigstore integration time:
-
Permalink:
eugmes/python-gdsii@34c66ca22f39225112a21ca5feaf76826aab40a3 -
Branch / Tag:
refs/tags/release-0.2.3 - Owner: https://github.com/eugmes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yaml@34c66ca22f39225112a21ca5feaf76826aab40a3 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc2cac3cad41882a747c0d883779182b9e7c066c095c8a96a9f31d5ef7a0194f
|
|
| MD5 |
8b3a05ea84be7bbb17c14105d3ed0a2c
|
|
| BLAKE2b-256 |
f0bdd514a3046b9502e5bf4443e69f05e0bb93e3ea416e1c2a0a20b511f23d2d
|
Provenance
The following attestation bundles were made for python_gdsii-0.2.3-py3-none-any.whl:
Publisher:
python.yaml on eugmes/python-gdsii
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_gdsii-0.2.3-py3-none-any.whl -
Subject digest:
bc2cac3cad41882a747c0d883779182b9e7c066c095c8a96a9f31d5ef7a0194f - Sigstore transparency entry: 763404488
- Sigstore integration time:
-
Permalink:
eugmes/python-gdsii@34c66ca22f39225112a21ca5feaf76826aab40a3 -
Branch / Tag:
refs/tags/release-0.2.3 - Owner: https://github.com/eugmes
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yaml@34c66ca22f39225112a21ca5feaf76826aab40a3 -
Trigger Event:
push
-
Statement type: