Starting on line (1), we configure GPIO pin 23 (BUTTON_GPIO_PIN == 23) as an input pin:
pi.set_mode(BUTTON_GPIO_PIN, pigpio.INPUT) # (1)
pi.set_pull_up_down(BUTTON_GPIO_PIN, pigpio.PUD_UP) # (2)
pi.set_glitch_filter(BUTTON_GPIO_PIN, 10000) # (3)
Next, on line (2), we enable an internal pull-up resistor for pin 23. In PiGPIO, we debounce the push button on line (3) using the pi.set_glitch_filter() method. This method takes the parameter in milliseconds.
Notice, in PiGPIO, we needed to configure each property for our button (pin input mode, a pull-up resistor, and debouncing) as a discrete method call, whereas in the previous GPIOZero example this all occurred on a single line when we created an instance of the GPIOZero LED class.