Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

Windows detailed installation guide

freyta edited this page Jul 28, 2019 · 1 revision

\Here are the long winded installation guides:

Windows

Here's a step-by-step guide. It looks long but it took me less than 20 minutes from start to finish to write and install as I typed this up:

  1. Download Python from the Python website (https://www.python.org/downloads/) and install it. Make sure it is installed to Path as well (should be an option on the installation screen!) This means whichever directory you are in you can run a Python script. i.e. you don't need to type in "C:\Program Files\python3\python.exe app.py" you can just type in "python app.py"

  2. Make sure you have pip installed. If you have not, follow the instructions on the pip installation page. Pip allows us to easily and quickly install all of our requirements so that we can run the script.

  3. Download the repository and extract it to a folder. I'll just use the folder location C:\. So the folder for me will be "C:\7Eleven-Python".

  4. Once that is done, open a command prompt (open the start menu, and type in "cmd.exe" - a little black icon with the letters C:\ will show next to it) and type in cd "location of your extracted folder". So in this example it will be cd "C:\7Eleven-Python". cd stands for "change directory". It's a good idea to use "s around your location because if it has a space in it it won't work. The command prompt will think you are typing in 2 separate commands.

  5. Now that we are in the 7-Eleven Python folder, you can type in pip install -r requirements.txt. This will install all of our external required modules. Things like 'requests' which allow us to make HTTP requests, and Flask which will display the webpage etc. If it is successful it will say something along the lines of: Successfully installed Flask-1.0.2 Jinja2-2.10.1 MarkupSafe-1.1.1 Werkzeug-0.15.4 apscheduler-3.6.0 asn1crypto-0.24.0 beautifulsoup4-4.7.1 certifi-2019.6.16 cffi-1.12.3 chardet-3.0.4 click-7.0 configparser-3.7.4 cryptography-2.7 flask-basicauth-0.2.0 googlemaps-3.0.2 idna-2.7 itsdangerous-1.1.0 pyOpenSSL-18.0.0 pycparser-2.19 pycryptodome-3.8.2 pytz-2019.1 requests-2.20.0 six-1.12.0 soupsieve-1.9.2 tzlocal-1.5.1 urllib3-1.24.3.

  6. Edit the settings.py in your favourite text editor. Notepad is fine. You really only need to change the DEVICE_NAME if you want to (so it mimics your actually phone), and the TZ if you want which is the timezone. Now back in the command prompt all you need to do is type in python app.py and it will say something like:

Note: You have not set an API key. You will not be able to use Google to find a stores coordinates. But you can still use the manual search if you know the postcode to the store you want to lock in from.

Note: You have not set an API key. You will not be able to use Google to find a stores coordinates. But you can still use the manual search if you know the postcode to the store you want to lock in from.

Note: You have not set a device ID. A random one will be set when you login. Note: No stores.json found, creating it for you.

  • Serving Flask app "app" (lazy loading)
  • Environment: production WARNING: Do not use the development server in a production environment. Use a production WSGI server instead.
  • Debug mode: off
  • Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)

This means the script is now running on "http://localhost:5000". http://0.0.0.0 means that anyone on your local network can access the webpage if they type in your IP address. For instance, if it was running on your PC and you wanted to access it from your phone you would type in "http://192.168.0.2:5000" or whatever your local IP address is of your PC.

Clone this wiki locally