Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Installation

Mohamad Nour Chawich edited this page Aug 25, 2016 · 2 revisions

Setup

  • Python requirements

Make sure to have python 2.7 installed with python -V.

$ git clone git@github.com:shoutit/shoutit-api.git
$ cd shoutit-api
$ pip install -U -r src/requirements/dev.text
$ pip install -r src/requirements/common_noupdate.text
  • Required services Install the following and make sure their configurations match those in src/configs/local.env

    • PostgreSQL 9.5
      • shoutit user must be created with superuser pribilages
      • shoutit_local database
    • Elasticsearch 2.x
    • Redis
  • External requirements

  • Migrations

    • Run the migrations for first time python manage.py migrate

Running the local server

$ python manage.py runserver local.api.shoutit.com:80

SHOUTIT_ENV environment variable should be set to local in all manage.py commands.

127.0.0.1 local.api.shoutit.com record should be created in your hosts file

Tests

Tests run with pytest.

Install test requirements

$ pip install -U -r src/requirements/test.text

Run the tests

$ py.test API_DIR --reuse-db --cov=src

When creating new migrations --reused-db should be replaced with --create-db

Windows

Are you Windows? No worries! We got you covered 👍 You need to install the following

pip install Pillow==3.3.0 --global-option="build_ext" --global-option="--disable-zlib" --global-option="--disable-jpeg"

Clone this wiki locally