This is a simple webapp to find the nearest and cheapest gas station based on the Tankerkoenig API and the CC by 4.0 license for the IT-Talents' monthly competition. All maps in this webapp are rendered through the OpenLayers library and the frontend of this app is in german.
Click here for a working demo.
These packages can be installed via pip, see installation instructions below.
Clone the repository:
git clone https://github.com/libeanim/refuelking.git
Create a virtual environment and activate it:
virtualenv -p python3 my_environment source my_environment/bin/activate
Use pip to install required packages in the virtual environment:
cd refuelking pip install -r requirements.txt
Run Test Server
This is a simple explanation to run this website on a local flask test server.
After you finished the installation procedure, execute the
init_all.pyscript in the activated virtual environment:
This will generate the configuration file and requires your Tankerkoenig api key. It also initialises a
sqlitedatabase in the module directory called
Execute now the
run_debug.pyscript to start the server:
That's it! You should now be able to access the website on http://127.0.0.1:5000/.
There are many ways to deploy a Flask application. Choose your favorite or mandatory way according to your webspace provider.
Then before you start the application set the following two environment variables:
Set the app configuration to production mode:
Set the url to your database:
More information on the sqlalchemy database url format can be found here.
Hint: A working engine for mysql and python3 is
Before the first run make sure the configuration and database has been created. You can do that by executing the
init_all.py script with the correct value for the environment variable