Skip to main content

PyAltiumLib is a tool to read Altium Designer library files.

Project description

Build and Release on GitHub GitHub Release Build and Release on PyPi PyPI Release Documentation Status

pyAltiumLib

PyAltiumLib is a tool to read Altium Designer library files. The included components are extracted. Metadata such as the description and the name of the component can be listed. It is also possible to visualize the component using the svgwrite package.

See full documentation here: ReadTheDocs

Example - Read the File and Retrieve Components

Load the file and retrieve the list of components.

import pyaltiumlib

# Path to the .schlib or .pcblib file
filepath = "Libfile.schlib"

# Load File
LibFile = pyaltiumlib.read(filepath)

# Read Meta Data
json = LibFile.read_meta()

# Get a List of All Components
all_parts = LibFile.list_parts()

Example - Render Components as SVG

Render each component as an SVG file. The components are saved as individual SVG files in the img_sch directory.

import svgwrite

# Iterate over all components to draw them
for partname in all_parts:

    # Choose element
    Component = LibFile.get_part(partname)

    # Create a new image with a white background
    dwg = svgwrite.Drawing(f"img_sch/{partname}.svg", size=(400, 400))

    # Draw component on svg drawing with size 400px 400px
    Component.draw_svg(dwg, 400, 400)

    # Save the SVG
    dwg.save()

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

pyaltiumlib-0.4.tar.gz (36.0 kB view details)

Uploaded Source

Built Distribution

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

pyaltiumlib-0.4-py3-none-any.whl (63.9 kB view details)

Uploaded Python 3

File details

Details for the file pyaltiumlib-0.4.tar.gz.

File metadata

  • Download URL: pyaltiumlib-0.4.tar.gz
  • Upload date:
  • Size: 36.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pyaltiumlib-0.4.tar.gz
Algorithm Hash digest
SHA256 71211c32e1337f37ba3e406bc4184ee80ec0470ea31b00ac1f63da96c6e9c41b
MD5 54f20aa1baf0acb166416c2bbc783867
BLAKE2b-256 fbdd8d420b820046b9bcb1dd68c48a1e4b1c28e8551582b6a98c7c40d2de88e1

See more details on using hashes here.

File details

Details for the file pyaltiumlib-0.4-py3-none-any.whl.

File metadata

  • Download URL: pyaltiumlib-0.4-py3-none-any.whl
  • Upload date:
  • Size: 63.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for pyaltiumlib-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7c63ddcba982e0c047d9a870ae8c5ee3c60b4a75acadf229c04e1b43107401d0
MD5 6ca550502f90cf2c683d92928adc2089
BLAKE2b-256 b078fe085dbdff89af1d426959bea93c810395c2ec499d410a1f4c46aad66a23

See more details on using hashes here.

Supported by

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