Development

The API is built with Python using Django and Django Rest Framework.

Dev Environment Overview

If you have not yet cloned the repository, do so and install the requirements:

$ git clone https://github.com/knowmetools/km-api
$ cd km-api
$ pip install -r requirements/base.txt

Local Dev Server

The development server can be run using the following command:

$ km_api/manage.py runserver

Running Tests

Tests are run with pytest. To run the tests, make sure the requirements are installed and run the tests:

$ pip install -r requirements/test.txt
$ pytest km_api/

Building Docs

We use sphinx for building documentation, and the docs are automatically published using ReadTheDocs. If you want to build the docs locally, install the requirements and run the build command:

$ pip install -r requirements/docs.txt
$ cd docs
$ make html