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

This tool is created based on the details given in several open-source repositories:

Example - Read the File and Retrieve Components

To install pyaltiumlib, use the following command:

pip install pyaltiumlib

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()

Footprint Symbol

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.6.2.tar.gz (36.9 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.6.2-py3-none-any.whl (64.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyaltiumlib-0.6.2.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for pyaltiumlib-0.6.2.tar.gz
Algorithm Hash digest
SHA256 e8ec9df82e7f1011f652cd8126f4330d4fad812343c293984706001374003d5f
MD5 3b883669f7bca4b939026bcb909cc980
BLAKE2b-256 c310d68abc0631145810cc1c92b2ed1c9da8e63f15abeb0c2b6a3af02083ccba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyaltiumlib-0.6.2-py3-none-any.whl
  • Upload date:
  • Size: 64.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for pyaltiumlib-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 023917f5c6025958a7c968cd571138b2380e34be9d21296607b9a951316c94df
MD5 f5fc55ed27630401f991ec5cb5654a10
BLAKE2b-256 b08f9fdcea90d17035e2bf41c03cb0e79e74022c96e5f4c42ec53994d9778e08

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