Basic Python help

I have a Blinkstick Flex. I cut it down to 20 LEDs and installed it in my case. I would now like to run some basic commands with the Python API but I’m struggling to understand the help/examples. I am using Windows

What I want to do is:

1: check if a Blinkstick Flex is connected
2: set each LED to a particular colour
3: turn each LED off

Would someone be able to provide some basic python code to do the above?

Cheers