This script provides a hardware driver for the Adafruit 128x32 OLED and Adafruit 128x64 OLED displays, which are based on the Solomon SSD1306 controller. The LEDs communicate over any I²C bus, but not SPI.
The driver supports CircuitPython applications.
Please see the source code repo for details of the driver’s API.
You can view SSD1306’s source code at GitHub.