Skip to content

CookTopper/web_service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CookTopper Web Service

This is a web application provided by Django, to provide all the data to intelligent stove. The features of this application relate to the mobile and display application, also available in this repository: CookTopper Mobile, CookTopper Display

Getting Started

Prerequisites

Python

To install Python 3 just update your environment

    $ sudo apt-get update
    $ sudo apt-get -y upgrade

Verify your Python version:

    $ python3 -V

You should see some output like this, but the version of Python 3 depends on your Operational System, (Debian 8 upgrades python to version 3.4.2)

Output
Python 3.4.2

PIP

The project uses pip to manage python software packages. To install it, just run

    $ sudo apt-get install -y python3-pip

We recommend using pip only in VirtualEnv mode, see more here

Install few more packages to support your python development

    $ sudo apt-get install build-essential libssl-dev libffi-dev python-dev

To verify your pip version, type

    $ pip3 --version

VirtualEnv

Virtual environments enable you to have an isolated space on your computer for Python projects, ensuring that each of your projects can have its own set of dependencies that won’t disrupt any of your other projects.

Setting up a programming environment provides us with greater control over our Python projects and over how different versions of packages are handled. This is especially important when working with third-party packages.

To install venv run command:

    $ sudo apt-get install -y python3-venv

With this installed, we are ready to create environments. Let’s choose which directory we would like to put our Python programming environments in, or we can create a new directory with mkdir, as in:

    $ mkdir environments
    $ cd environments

Once you are in the directory where you would like the environments to live, you can create an environment by running the following command:

    $ python3 -m venv my_env

To use this envornment, you need to activate it, just do it typing:

    $ source my_env/bin/activate

Your prompt will now be prefixed with the name of your environment, in this case it is called my_env. Depending on what version of Debian Linux you are running, your prefix may look somewhat different, but the name of your environment in parentheses should be the first thing you see on your line:

(my_env) user@debian:~/environments

Installation

Before we install Django, make sure your Virtual Environment is active (in the above topic).

  • Clone the repository in a folder

  • Enter the repository folder

Run pip command to install python project dependencies

    $ pip3 install -r requirements.txt

A lot of python packages will be installed ONLY in your virtual environment, including Django.

Running Project

With all dependencies installed, you must run the application.

Inside repository folder, (at root) run command

    $ python3 manage.py runserver 8000

You can access the web service at (localhost:8000)

Built With

Authors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages