skillfed

ft4222

Python wrapper around libFT4222.

ft4222 v1.13.0 104.9K downloads/30d#12,730 on PyPI
Permissive license MIT AND LicenseRef-FTDI AGING released

What it is and what it does

ft4222 is a Python wrapper around FTDI's LibFT4222 library, providing direct control over FT4222H USB-to-peripheral interface chips. The library exposes I2C master, SPI master, and GPIO functionality through a Python API that mirrors LibFT4222's C interface. It has no runtime dependencies beyond the system's LibFT4222 installation and supports modern Python versions (3.9 through 3.14).

The package is used to communicate with I2C and SPI peripherals connected through an FT4222H device, or to control GPIO pins on the chip itself. Typical workflows involve enumerating connected devices, opening a specific device by description, initializing the desired interface (I2C, SPI, or GPIO), and then performing read/write operations. The binding is incomplete relative to the full LibFT4222 API but covers the core use cases shown in the documentation examples.

Use it for:

  • Control I2C peripherals (sensors, EEPROMs) connected via FT4222H from a USB host without native I2C support.
  • Communicate with SPI devices (flash memory, displays) over USB using the FT4222H as a bridge.
  • Toggle GPIO pins on the FT4222H for signaling, timing control, or device enable/disable logic.
  • Prototype embedded systems on a development machine by bridging USB to I2C/SPI without dedicated hardware interfaces.
  • Automate hardware testing or configuration workflows that require USB-based I2C/SPI access.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Python bindings to LibFT4222, enabling control of FT4222H USB2.0-to-Quad SPI/I2C device controllers for I2C, SPI, and GPIO operations.

Yes, if you have an FT4222H device and need Python control over I2C, SPI, or GPIO on that chip. The package is stable (Production/Stable status), has no runtime dependencies, and covers the main use cases. However, maintenance is aging (182 days since last release), so verify that the incomplete API coverage includes the LibFT4222 functions you need before committing to it.

Install

ft4222 on PyPI

pip

pip install ft4222

uv

uv add ft4222

poetry

poetry add ft4222

Installing ft4222

Before you install

Medium install friction due to compiled wheels; requires Python 3.9 or later. No runtime dependencies. Last release was 182 days ago; maintenance status is aging but the package has been stable since its 2020 initial release.

License in practice

Dual-licensed under MIT and LicenseRef-FTDI (permissive). The FTDI license component may carry additional restrictions specific to FTDI hardware; review the full license text before commercial use.

Quickstart

import ft4222

# List devices
nbDev = ft4222.createDeviceInfoList()
for i in range(nbDev):
    print(ft4222.getDeviceInfoDetail(i, False))

# Open device and initialize I2C master
dev = ft4222.openByDescription('FT4222 A')
dev.i2cMaster_Init(100)

FT4222H hardware device must be connected; on Linux, udev rules may be required for user-level access (see documentation).

Verify before relying

  • Whether LibFT4222 system library must be pre-installed on the target system
  • Compatibility with Python 3.14 (listed in classifiers but not in requires_python constraint)
  • Whether udev rules on Linux are required for non-root access or only recommended

Package facts

License MIT AND LicenseRef-FTDI (permissive)
Python support supports the current Python release (>=3.9.0)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance aging — 182 days since the last release
First released
Downloads 104,934/month — #12,730 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ft4222-1.13.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; ft4222-1.13.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; ft4222-1.13.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; ft4222-1.13.0-cp310-cp310-manylinux_2_28_i686.whl; ft4222-1.13.0-cp310-cp310-win32.whl; ft4222-1.13.0-cp310-cp310-win_amd64.whl; ft4222-1.13.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; ft4222-1.13.0-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; ft4222-1.13.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; ft4222-1.13.0-cp311-cp311-manylinux_2_28_i686.whl; ft4222-1.13.0-cp311-cp311-win32.whl; ft4222-1.13.0-cp311-cp311-win_amd64.whl; ft4222-1.13.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; ft4222-1.13.0-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; ft4222-1.13.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; ft4222-1.13.0-cp312-cp312-manylinux_2_28_i686.whl; ft4222-1.13.0-cp312-cp312-win32.whl; ft4222-1.13.0-cp312-cp312-win_amd64.whl; ft4222-1.13.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; ft4222-1.13.0-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl

Keywords: ftdi, ft4222

Development Status :: 5 - Production/StableOperating System :: MacOS :: MacOS XOperating System :: MicrosoftOperating System :: POSIX :: LinuxProgramming Language :: CythonProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: CommunicationsTyping :: Typed

Tags

ftdi ft4222 python bindingsusb to i2c spi controllerft4222h device controllibft4222 python wrapperusb gpio i2c spi interface
usb-peripheral-bridgeembedded-hardware

More Communications packages