skillfed

pypylon

The official Python language binding for the Basler pylon C++ APIs.

pypylon v26.7 99.0K downloads/30d#13,045 on PyPI708
License unclear Other/Proprietary License Active released

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 pypylon

uv

uv add pypylon

poetry

poetry add pypylon

Installing 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

License :: Other/Proprietary LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: Windows :: Windows 10Operating System :: Microsoft :: Windows :: Windows 11Operating System :: Microsoft :: Windows :: Windows 7Operating System :: Microsoft :: Windows :: Windows 8Operating System :: POSIX :: LinuxProgramming Language :: C++Topic :: Multimedia :: Graphics :: Capture :: Digital CameraTopic :: Multimedia :: Video :: CaptureTopic :: Scientific/Engineering

Tags

basler camera control pythonmachine vision image capturepylon camera api bindingindustrial camera python sdkimage acquisition baslercomputer vision camera interfacegenICam camera control
camera-controlmachine-visionhardware-binding

More Scientific/Engineering packages