Typed Python bindings for the Alibre Design V29 AlibreX API
Project description
alibrex package
alibrex is a Python wrapper for the Alibre Design V29+ AlibreX automation API. The native AlibreX is a COM interface exposed to .NET
alibrex turns it into a typed, idiomatic Python module.
Features
- Full IDE support. Every interface, enum, and method is declared in PEP 561 type stubs — autocomplete, hover docs, and type-checking work out of the box in VS Code, PyCharm, or any pyright/Pylance-aware editor.
- Single namespace. Everything is at the top level:
CurrentPart(),CurrentAssembly(),connect(), plus ~280 typed AlibreX interfaces and enums. - Example and demo driven. The repository includes Jupyter notebooks, plus dozens of test scripts, demos and reference utilities.
Installation
From PYPI
What's in this repository
| Folder | Description |
|---|---|
notebooks/ |
Jupyter tutorial sequence (00–11) plus topic references (connecting, cleanup, 2D/3D sketches, parameters, configurations, property reading, PDM) |
demo/ |
Self-verifying scripts — feature CRUD, sketch / assembly constraints, parameters, configurations, events, profile library |
demo/muffler/ |
Bundled multi-part industrial assembly used by the asm_* and crud_13..18* demos |
demo/profiles/ |
Profile library (steel, wood, threads, pipe) consumed by the prof_* demos |
demo/cad-files/ |
Reference CAD artifacts referenced by the demos |
examples/ |
Demonstration scripts — numbered intro 00..27, plus the subfolders below |
examples/advanced/ |
Reference geometry, 2D/3D sketch showcases, import/export utilities |
examples/advanced/py/ |
Python implementations |
examples/advanced/md/ |
Companion markdown originals for each script |
examples/ported/ |
Ports of the official AlibreScript samples |
examples/ported/library/ |
Standalone utilities (gear generator, STL exporter, equation sketcher, etc.) |
examples/probes/ |
Property-probe reports for the major object types |
examples/pdm/ |
PDM (Product Data Management) walk-through — 13 progressive scripts: connect → safes → property defs / classes / templates → projects / libraries / folder tree → file properties + version history → locked-file scan, session ↔ PDM cross-ref, full Program.cs port |
examples/_sample_files/ |
Sample .AD_PRT / .AD_ASM materialized on first use by file-loading examples |
Requirements
- Windows + a licensed installation of Alibre Design (V29 or newer)
- Old versions of Alibre Design may work, but are not tested
- Python 3.9–3.13
pythonnet>=3.0,<4(installed automatically)
AlibreX.dll is not redistributed at import time alibrex locates it by checking, in order, the $ALIBREX_DLL env var, the Windows registry (AlibreX.AutomationHook COM ProgID, then HKLM\SOFTWARE\Alibre, Inc.\Alibre Design\…\HomeDirectory), and finally a %ProgramFiles%\Alibre Design*\Program\AlibreX.dll
see notebooks/diagnose_setup.ipynb to inspect what each source returns on your machine.
Quick start
Open Alibre Design and any part document, then:
from alibrex import CurrentPart
part = CurrentPart()
print(part.Name, part.FeatureCount, part.Bodies.Count)
See notebooks/00_hello.ipynb and notebooks/connect_methods.ipynb to get oriented.
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alibrex-1.0.0.tar.gz.
File metadata
- Download URL: alibrex-1.0.0.tar.gz
- Upload date:
- Size: 52.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c99d2c7260cad4bc9b9a944b9858121522d5130aedae2877c31ce06e75bcdf1
|
|
| MD5 |
7aaf5a127165cbe1f7a68803d3b0761a
|
|
| BLAKE2b-256 |
2f80c370bed6a9fc219ddf427b90f142e5a61e5312ea19963953cfa4d6f851d6
|
File details
Details for the file alibrex-1.0.0-py3-none-any.whl.
File metadata
- Download URL: alibrex-1.0.0-py3-none-any.whl
- Upload date:
- Size: 57.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c05208c1d27aca4ba9662385f7a30e8e728d91d006975c752c9104063bba0ea1
|
|
| MD5 |
ccb2f89158de971ad22e075ea0eb2ab2
|
|
| BLAKE2b-256 |
83e282e69d387d5ea3d3cdf6f75b4645441aaa1a51e161c913a472f87ece8d1e
|