I’ve used a Zero running Jessie Lite to make a media server - for the purpose of streaming movies to my kids’ Android tablets on long car journeys. It’s powered by a USB battery pack.
The Pi runs
hostapd to create a wireless network
isc-dhcp-server to offer a DHCP service
minidlna to offer a media streaming service
It works fine - and can even stream two MP4 movies simultaneously. I’ve added a reset button onto the RUN points on the board. I’d like to add a soft shutdown button but haven’t spent enough time understanding GPIOs to make that work yet.
while there’s nothing wrong with the python script in the link above I would suggest taking advantage of gpiozero, not mentioning subprocess is probably the recommended method to integrate shell commands in Python at this point.
Something like this should be working, YMMV:
from subprocess import call
from gpiozero import Button
my_button = Button(26)
my_button.wait.for.press()
print("Shutting system down")
call("sudo poweroff", shell=True)
… the code above uses BCM26, so you’d wire the button to the pins parallel to the RUN pins, like so: