I used the luma.oled library to display info in Python. My OLED is a sh1106 and uses I2C communication.

You will need to install the luma library following their instructions.

This is the most simple example I could come up with. The syntax is draw.txt((left_offset, top_offset), "Text to display", options)

RPi-01.jpg
Figure 1. Chicken Door Display
#!/usr/bin/env python

# GPIO.VERSION '0.6.3'
# Raspberry Pi 3 Model B Rev 1.2
from luma.core.interface.serial import i2c
from luma.core.render import canvas
from luma.oled.device import sh1106

# setup the OLED
serial = i2c(port=1, address=0x3C)
device = sh1106(serial)

door_status = "Open"

        with canvas(device) as draw:
                draw.rectangle(device.bounding_box, outline="white", fill="black")
                draw.text((10, 5), "Door Status {}".format(door_status), fill="white")