{"id":21761,"library":"pylibftdi","title":"pylibftdi","description":"Pythonic interface to FTDI devices using libftdi. Current version 0.24.0, requires Python >=3.10. Released under BSL-1.0, maintained on GitHub. Cadence: irregular, with recent releases in 2024.","status":"active","version":"0.24.0","language":"python","source_language":"en","source_url":"https://github.com/codedstructure/pylibftdi","tags":["ftdi","usb","serial","bitbang","embedded"],"install":[{"cmd":"pip install pylibftdi","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required system library; on Linux install via apt (libftdi1-dev)","package":"libftdi1","optional":false}],"imports":[{"note":"Public API is in pylibftdi top-level; submodules are internal.","wrong":"from pylibftdi.device import BitBangDevice","symbol":"BitBangDevice","correct":"from pylibftdi import BitBangDevice"},{"note":"FtdiDriver was removed; use Device directly.","wrong":"from pylibftdi.driver import FtdiDriver","symbol":"Device","correct":"from pylibftdi import Device"},{"note":"","symbol":"Driver","correct":"from pylibftdi import Driver"}],"quickstart":{"code":"import os\nimport time\nfrom pylibftdi import Device\nwith Device(mode='t', device_id=os.environ.get('DEVICE_SERIAL', '')) as dev:\n    dev.write(b'hello')\n    time.sleep(0.1)\n    print(dev.read(10))","lang":"python","description":"Opens first available FTDI device in async mode, writes bytes, reads response."},"warnings":[{"fix":"Upgrade Python to 3.10+ or pin pylibftdi to 0.23.x for older Python.","message":"pylibftdi dropped support for Python <3.10 in version 0.24.0.","severity":"breaking","affected_versions":"<0.24.0"},{"fix":"Replace baudrate=... with baud=... in Device constructor.","message":"The 'baudrate' argument is deprecated in some contexts; use 'baud' instead.","severity":"deprecated","affected_versions":">=0.22.0"},{"fix":"Add udev rule: SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0403\", ATTRS{idProduct}==\"6001\", MODE=\"0666\"","message":"On Linux, you must have udev rules or run with sudo to access FTDI devices. Missing rules cause 'FtdiError: libusb_open() failed'.","severity":"gotcha","affected_versions":"all"},{"fix":"Check datasheet: e.g., for FT232R, D0..D7 correspond to pins 1-8 (CBUS0-3 in bitbang mode).","message":"When using BitBangDevice, note that pin numbering is bit index, not physical pin. Miswiring is common.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure device is plugged in and you have udev rules set. Or run with sudo (temporary).","cause":"No permission to access USB device or device not connected.","error":"pylibftdi.exc.FtdiError: libusb_open() failed"},{"fix":"List devices with pylibftdi.Driver().list_devices() to see available serials.","cause":"The specified device_id or serial does not match any connected FTDI device.","error":"pylibftdi.exc.FtdiError: FTDI device not found"},{"fix":"Use pylibftdi.Driver instead.","cause":"FtdiDriver was removed in pylibftdi 0.22.0.","error":"AttributeError: module 'pylibftdi' has no attribute 'FtdiDriver'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}