{"id":5394,"library":"pyftdi","title":"pyftdi: FTDI Device Driver","description":"pyftdi is a pure Python driver for FTDI devices, providing access to their various functionalities including USB-to-serial, SPI, I2C, and GPIO. It acts as a wrapper around the `libftdi` C library, enabling cross-platform control of FTDI-based hardware. The current version is 0.57.1, with an active development cadence supporting recent Python versions.","status":"active","version":"0.57.1","language":"en","source_language":"en","source_url":"https://github.com/eblot/pyftdi","tags":["hardware","ftdi","usb","spi","i2c","gpio","driver"],"install":[{"cmd":"pip install pyftdi","lang":"bash","label":"Install core library"},{"cmd":"pip install pyftdi[pyusb]","lang":"bash","label":"Install with PyUSB support (optional)"}],"dependencies":[],"imports":[{"symbol":"Ftdi","correct":"from pyftdi.ftdi import Ftdi"},{"symbol":"SpiController","correct":"from pyftdi.spi import SpiController"},{"symbol":"I2cController","correct":"from pyftdi.i2c import I2cController"}],"quickstart":{"code":"from pyftdi.ftdi import Ftdi\n\ndef list_ftdi_devices():\n    \"\"\"\n    Scans and lists available FTDI devices.\n    Requires 'libftdi' to be installed on the system and appropriate\n    USB permissions.\n    \"\"\"\n    print(\"Scanning for FTDI devices...\")\n    try:\n        # Ftdi.show_devices() prints detected devices to stdout\n        Ftdi.show_devices()\n        print(\"\\nIf no devices are listed, ensure they are connected,\")\n        print(\"libftdi is installed, and USB permissions are correct.\")\n    except Exception as e:\n        print(f\"Error scanning for devices: {e}\")\n        print(\"Ensure 'libftdi' is installed and USB permissions are set correctly.\")\n\nif __name__ == \"__main__\":\n    list_ftdi_devices()","lang":"python","description":"This quickstart code demonstrates how to scan and list all detected FTDI devices connected to your system. It is a common first step to verify the `pyftdi` installation and device connectivity without requiring specific device URLs or complex operations. It relies on the underlying `libftdi` C library."},"warnings":[{"fix":"Install `libftdi` via your system's package manager (e.g., `sudo apt-get install libftdi1-dev` on Debian/Ubuntu, `brew install libftdi` on macOS) or build from source.","message":"pyftdi requires the `libftdi` C library to be installed on the system. `pip install pyftdi` only installs the Python wrapper, not the underlying C library. Without `libftdi`, pyftdi will not function.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Create appropriate udev rules (Linux) or ensure the user has permission to access USB devices. Consult `libusb` or `libftdi` documentation for detailed setup. On Linux, temporarily running with `sudo` can confirm permission issues, but proper udev rules are recommended.","message":"On Linux and macOS, accessing USB devices directly often requires specific user permissions (e.g., udev rules). Without these permissions, pyftdi may fail to detect or interact with FTDI devices.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use a tool like Zadig to install the WinUSB driver for your FTDI device. Be aware this may prevent other applications that rely on the standard FTDI drivers from working.","message":"On Windows, pyftdi (via libusb) may conflict with standard FTDI drivers (e.g., VCP, D2XX). You might need to replace the standard drivers with WinUSB (using tools like Zadig) for pyftdi to detect the device.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Upgrade your Python environment to Python 3.9 or newer. The current recommended minimum version is Python 3.9.","message":"Support for Python 3.8 and older versions has been deprecated and removed. Running pyftdi on Python 3.8 or earlier will result in errors or installation failure due to `Requires-Python` metadata.","severity":"breaking","affected_versions":">=0.56.0"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}