burgers_and_beer.py is an iOS app written entirely on an iPad in Python 2.7 using the Pythonista for iOS Integrated Development Environment. The app is a single Python file that uses the requests module to gather bar and offers data from the ChamonixHackathon2015 API. The Pythonista console and ui modules are then used to create two user interfaces:
- BarsView which displays graphic buttons for seven bars in Chamonix, France
- BarView which displays the photo, map, and table of food and drink offers for one bar
- In Pythonista, open a new, empty script.
- Paste the contents of
burgers_and_beer.py
into the Editor window. - Press the run button
▶
at the top right of the Editor.
Known issues:
- The app runs only in landscape mode
- The app was built for the iPad form factor and might need adjustment for iPhones
- Downloading the images of all seven bars causes a long startup delay. Images should be cached after the first download.
- The Munster bar image does not show up in BarsView but does show up in BarView.
We gladly accept pull requests for improvements of the app. Happy hacking.