PyEAGLE - Read / Write Cadsoft EAGLE Files

Scott Torborg

PyEAGLE is an interchange API to read and write Cadsoft EAGLE XML (v6 and later) schematic, library, and PCB layout files.

Some long term goals are:

  • Comprehensive and round-trip-capable interface between Pythonic data structures and EAGLE’s XML format, eliminating the impedance mismatch involved in manipulating EAGLE files in Python scripts.
  • Traversal and net analysis helpers, to serve as a foundation for higher-level tools.
  • Rendering capability in SVG.
  • Command-line tools, including basic grep and lint tools.

At this point it is fairly incomplete and not ‘production useful’.

Example Usage

lib = pyeagle.open('SparkFun-Sensors.lbr')
for part in lib:
    print part

Screenshot

Everyone loves screenshots.

>NAME>VALUE

Contents

Quick Start

Install

Install with pip:

$ pip install pyeagle

Use

Open a library file, print some info about the contents.

import pyeagle

lib = pyeagle.open('SparkFun-Sensors.lbr')

for device_set in lib:  # could also use lib.device_sets
    print device_set

for symbol in lib.symbols:
    print symbol

for package in lib.packages:
    print package

API Reference

Contributing

Patches and suggestions are strongly encouraged! GitHub pull requests are preferred, but other mechanisms of feedback are welcome.

PyEAGLE hopes to have a comprehensive test suite with 100% line and branch coverage, as reported by the excellent coverage module. To run the tests, simply run in the top level of the repo:

$ tox

This will also ensure that the Sphinx documentation builds correctly, and that there are no PEP8 or Pyflakes warnings in the codebase.

Contributors

Thanks to Bernard “Guyzmo” Pratz for zc.buildout support.

Indices and Tables