Skip to content

octo-woapi/SAPI1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAPI1

Basic API for SAPI1 live coding

Getting started

Python 3.5 and dependencies installation

On UNIX/Linux environments

  • Install python 3 $ sudo apt-get install python3
  • Install pip3 $ sudo apt install python3-pip
  • Install virtualenv $ pip3 install virtualenv

On MAC environments

  • Install python 3 $ brew install python3
  • Install pip3 $ brew install python3-pip
  • Install virtualenv $ pip3 install virtualenv

On Windows environments

Clone the project

  • Create a folder in your workspace that will be dedicated to the project. Then, clone the repository

    $ git clone [email protected]:octo-woapi/SAPI1.git

    Enter the SAPI1 folder. Every command bellow will be made from this folder

Makefile

A makefile is a special file, containing shell commands with shortcuts. The command make is used to execute commands from the Makefile. It is native on Unix and MACOSX OS. If you have troubles installing or using make in a Windows environment, you can open the Makefile file and copy the commands you want to execute directly into your terminal

Virtual environment

The API project is accessible via a python virtual environment. For more informationlis about virtualenvs, check the official documentation

Create a virtual environment inside the SAPI1 folder

virtualenv venv

Check the existence of a sub-folder named venv

Every command or action should now be made inside the virtual environment. To activate the virtual environment :

On Linux / MAC : source venv/bin/activate

On Windows : venv/Scripts/activate.bat

Check that your prompt starts with (venv)

Install dependencies

This command should be made inside the virtual environment only.

make install_requirements_dev

Start the API

This command should be made inside the virtual environment only.

make start

The API runs on the address 127.0.0.1 (localhost) on the port 5000

Visit http://localhost:5000/sapi/hello