Developed on a Raspberry Pi 4 board using library gpiozero.
See gpiozero documentation
for the required GPIO input and components.
All required packages should be installed on a default Raspian installation, so just run it:
# Might need to make the file executable by running:
# chmod u+x main
./main ls
MIT
Do what you want - don't blame me.