Skip to content

Setting up the development environment

Mario Muñoz edited this page Jun 25, 2014 · 2 revisions

Checking out the code

Just navigate into a directory of your convenience and checkout the code from this repository using the command:

git clone https://github.com/mariomgal/eurosentiment-tutorial-python.git

Downloading requirements

The project requires requests and Flask to be installed in your Python environment. If they aren't installed, just run the command pip install -r requirements.txt in the project root folder.

Using an IDE

Some recommended IDEs are:

Running the default example

Just navigate to your project's root folder and execute the command python server/server.py. It will start a server at http://localhost:5000 to which you can send POST requests and examine the results.

Running as daemon

You can daemonize the server just by executing the provided server.sh script inside bin folder (note that probably you should give executions permission to the script with chmod +x server.sh. You can start and stop the server daemon by executing server.sh start and server.sh stop.