Skip to main content

Python package for 2D and 3D rendering of GerberX3 files.

Project description

https://raw.githubusercontent.com/Argmaster/pygerber/main/docs/_static/pygerber_logo.png

Overview

PyGerber is a Python library for 2D and 3D rendering of Gerber X3 files. It is completely written in Python, and only dependencies are limiting its portability.

3D rendering is still under development, it will arrive at next major release. (v1.0.0)

This package is a Free Software; it is released under MIT license. Be aware that dependencies might be using different licenses.

PyGerber offers a CLI and API for Python to allow easy rendering of Gerber files. Parser was build with GBR X3 format in mind, however, it has extensive support for older standards and deprecated features. Package is using third party libraries for low level drawing and mesh creation.

PyGerber’s parser was not ment to be used by package users, but there are no obstacles preventing you from using it. However, stability of the API is not guaranteed between minor releases (I’ll do my best to make it stable among patches).

Installation

PyGerber is available on PyPI and can be obtained via pip

pip install pygerber

Be aware that this will only install general and 2D rendering dependencies, as bpy (Blender) is not officially released as Python package. You have to obtain it yourself, which, for example, you can archive with help of guides contained in this repository.

You can also install the in-development version from github with

pip install https://github.com/Argmaster/pygerber/archive/main.zip

Same Blender dependency issue applies to this installation method.

Compatibility

PyGerber officially supports only Python 3.9, but 2D rendering should be also available for 3.8 and 3.7, as long as Pillow provides support for those versions. 3D rendering is not possible on those versions of Python due to compatibility issues of Blender binaries and Blender’s API changes.

Documentation

Documentation of this library is available at https://pygerber.readthedocs.io/

Development

To run all the tests, just run:

tox

To see all the tox environments:

tox -l

To only build the docs:

tox -e docs

To build and verify that the built package is proper and other code QA checks:

tox -e check

To build sdist, and bdist_wheel:

python setup.py clean --all sdist bdist_wheel

To make a release of the project on PyPI, assuming you got some distributions in dist/, the most simple usage is:

twine upload --skip-existing dist/*.whl dist/*.gz dist/*.zip

Credits

Structure of this project was created using cookiecutter template cookiecutter-pylibrary. I’m very grateful to Ionel Cristian Mărieș for its creation.

Changelog

0.0.0 (2021-09-25)

  • First release on PyPI.

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

pygerber-0.0.1.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

pygerber-0.0.1-py2.py3-none-any.whl (43.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pygerber-0.0.1.tar.gz.

File metadata

  • Download URL: pygerber-0.0.1.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for pygerber-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d761f2db7b79e7adb55e76b5992b41c60098ff8852b69ab04f88ef8c9da8c377
MD5 9736f4307d32addf7b2b79954e0bc1dd
BLAKE2b-256 a867a21634be168d9005fb7394b35a1cfe2e39d1c5121cb50b2ee5af95ecd6ff

See more details on using hashes here.

Provenance

File details

Details for the file pygerber-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pygerber-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 43.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for pygerber-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 94ab249aaace4ec3e7dfa79d83dc79799e6a4ec8d7d1359c2c6844d170dad7ed
MD5 5bf47b49cd2d4884960ee5e0d5640180
BLAKE2b-256 620553eca7aa3756916cde01c6909c51d6ad5de355e69846758a30b1164103fb

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page