In the pigpio_led_class.py file, we have a Python class that is a re-engineering of the PiGPIO LED example to wrap it as a class that mimics the GPIOZero LED class. It demonstrates the basic principle of how GPIOZero abstracts away lower-level GPIO complexity. This re-engineered class can be used as a drop-in replacement for the GPIOZero LED examples in this chapter, as shown here. See the header comments in pigpio_led_class.py for more information:
""" chapter02/dweet_led.py """
...
# from gpiozero import LED # Comment out import
from pigpio_led_class import PiGPIOLED as LED # Add new import
I hope you find these two bonus files interesting, and that by exploring the PiGPIO LED as a class example, you can better appreciate how the higher-level GPIOZero library and lower-level PiGPIO library relate to one another.
At this stage of your journey, if you are a little unclear about what's happening...