NOTE: This tool is currently broken and incomplete, and is awaiting a rewrite! I have a rewrite in Rust that is significantly more usable (documentation and repository). Python bindings are a long way off, but contributions there are welcome!
A tool to process Altium file types. Currently this tool is in alpha and does not have any parts fully functioning, except for the listing of PCBLib and SCHLib libraries.
See full documentation here (WIP): pyaltium.readthedocs.io
The goal of this project is to support most file types used by Altium. Reading is a priority, writing will be implemented for some types. The status of various file types is listed below:
Extension | List Items | Display | Write | Documentation | |
---|---|---|---|---|---|
Binary Schematic Library | .SchLib | ✓ | WIP | WIP | |
Binary PCB Library | .PcbLib | ✓ | WIP | WIP | |
Binary Schematic Doc | .SchDoc | ||||
Binary PCB Doc | .PcbDoc | ||||
Draftsman Doc | .PcbDwf | ||||
PCB Project | .PrjPcb | ||||
Material Library | .xml | ✓ | N/A | ✓ | WIP (see test_matlib in the meantime) |
Any templates | Not Planned |
Sample usage:
import pprint
from pyaltium import SchLib
# Set up our pretty printer so our output is understandable
pp = pprint.PrettyPrinter(indent=4)
sl = SchLib("myfile_name.SchLib")
pp.pprint(SchLib.list_items())
This returns something like the following with more elements:
[
{
"libref": "ref1",
"description": "My description",
"sectionkey": "Section Key" // This is unneeded, just for internals
}
]
Currently the only PCB library capability is creating a list of footprints
Sample usage:
import pprint
from pyaltium import SchLib
# Set up our pretty printer so our output is understandable
pp = pprint.PrettyPrinter(indent=4)
sl = SchLib("myfile_name.SchLib")
pp.pprint(SchLib.list_items())
Returns:
[
{
"footprintref": "ref1",
"height": "2.8", // mm
"description": "My description"
},
// ...
]
Have an idea? Open an issue! Have a change? submit a PR!
Note that I have a long ways to go on this so don't expect too much as of now. Help is always welcome.
This project is licensed under GPLv3. Basically you can use this however you want but if you distribute (aka sell) something with it, you need to make the source available. Once this project gains some traction, I'll be open to moving to MIT if there's demand for it.