In micropython there is a module neopixel to interact with ws2812 addressable LEDs an example code is
from microbit import *
import neopixel
pixel = neopixel.NeoPixel(pin0, 64)
pixel[0] = (255, 0, 0)
pixel.show()
This declares 64 leds controlled by pin0, sets the first one to red and updates the led array.
How do i declare a class so i can just assign values like the line pixel[0] = (255, 0, 0)
?