pypylon
The official Python language binding for the Basler pylon C++ APIs.
What it is and what it does
pypylon wraps Basler's pylon C++ camera control library for Python, letting you discover, configure, and capture images from Basler machine vision cameras. It exposes the full pylon parameter API with convenience methods (SetToMaximum, TrySetValue, GetValueOrDefault) and context manager support for automatic resource cleanup. The package also includes bindings for the pylon Data Processing API, which lets you load and execute image processing recipes created in the pylon Workbench graphical editor.
The library is actively maintained by Basler and ships prebuilt wheels for Windows, Linux (x86_64 and aarch64), and macOS (both Intel and ARM). Version 26.6 and later introduced breaking changes in the parameter assignment API (moving from direct assignment like `cam.Gain = 42` to the recommended `cam.Gain.Value = 42`), so existing code may need updates. Installation of the pylon Software Suite is strongly recommended but not mandatory for basic wheel installation.
Use it for:
- Acquire images from Basler industrial cameras in machine vision inspection pipelines
- Automate camera configuration (exposure, gain, pixel format) in production imaging systems
- Build barcode or defect detection workflows using pylon Data Processing recipes
- Integrate Basler 3D cameras (e.g. blaze) into Python computer vision applications
- Stream live camera frames to OpenCV or NumPy for real-time image analysis
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pypylon is the official Python binding for Basler pylon C++ APIs, enabling control and image acquisition from Basler machine vision cameras and supporting image processing via the pylon Data Processing API.
Yes, if you are using Basler cameras and need Python control. The library is actively maintained, has no known vulnerabilities, and is the official binding—making it the standard choice for Basler hardware integration. Install friction is moderate due to platform-specific wheels and the recommended pylon Software Suite dependency, but prebuilt wheels are available for all major platforms. The unclear proprietary license requires review before use in commercial or copyleft contexts.
Install
pypylon on PyPI
pip
pip install pypylonuv
uv add pypylonpoetry
poetry add pypylonInstalling pypylon
Before you install
Medium install friction due to platform-specific wheels (Windows, Linux x86_64/aarch64, macOS arm64/x86_64) and a strongly recommended but not mandatory system dependency on the pylon Software Suite. Active maintenance with recent releases (22 days since last update).
License in practice
Licensed under Other/Proprietary License with unclear treatment—no SPDX identifier provided. Review Basler's licensing terms before integrating into proprietary or copyleft projects.
Quickstart
pip install pypylon
from pypylon import pylon
with pylon.InstantCamera(pylon.FirstFound) as camera:
camera.Width.TrySetToMaximum()
camera.StartGrabbingMax(100)
while camera.IsGrabbing():
with camera.RetrieveResult(5000, pylon.TimeoutHandling_ThrowException) as grab_result:
if grab_result.GrabSucceeded():
img = grab_result.GetFirstImageDataComponent().Array
Requires pylon Software Suite installed on the system (strongly recommended); CodeMeter Runtime required for pylon Data Processing API extension and vTools on some platforms.
Verify before relying
- Whether pylon Software Suite can be omitted entirely or if certain camera operations fail without it
- Exact Python version support (requires_python is unspecified in metadata)
- Scope and licensing terms of the pylon Data Processing API extension
- Whether GenICam Generic Data Container (GenDC) format support is automatic or requires additional setup
Package facts
| License | Other/Proprietary License (unclear) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 22 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 98,978/month — #13,045 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pypylon-26.7-cp39-abi3-macosx_14_0_arm64.whl; pypylon-26.7-cp39-abi3-macosx_14_0_x86_64.whl; pypylon-26.7-cp39-abi3-manylinux_2_31_aarch64.whl; pypylon-26.7-cp39-abi3-manylinux_2_31_x86_64.whl; pypylon-26.7-cp39-abi3-win_amd64.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
pytapoPyTapo is a Python library that communicates…
permissive · top 15,000 on PyPI
pygrabberCapture photos and video from Windows cameras…
permissive · top 15,000 on PyPI
blinkpyA Python library for controlling and monitoring…
permissive · top 15,000 on PyPI
zxing-cppReads and writes barcodes and QR codes in…
permissive · top 5,000 on PyPI
genicamProvides Python bindings to GenICam, enabling…
unclear · top 15,000 on PyPI
pyzxingDecode barcodes and QR codes from images or…
permissive · top 15,000 on PyPI
onvif-zeep-asyncAsync Python client for ONVIF IP cameras using…
permissive · top 15,000 on PyPI
harvestersHarvester simplifies image acquisition from…
permissive · top 15,000 on PyPI
pyobjc-framework-ImageCaptureCoreProvides Python bindings to macOS's…
permissive · top 15,000 on PyPI
freetype-pyProvides Python bindings to the FreeType font…
permissive · top 5,000 on PyPI