项目作者: ooni

项目描述 :
OONI Measurements API
高级语言: Python
项目地址: git://github.com/ooni/api.git
创建时间: 2016-10-25T17:59:28Z
项目社区:https://github.com/ooni/api

开源协议:BSD 3-Clause "New" or "Revised" License

下载


OONI API

Source for https://api.ooni.io/

File bugs with the API inside of: https://github.com/ooni/backend/issues/new

Local development

You can run the OONI API locally in a development environment using docker
and docker-compose. Follow the instructions below to set it up.

Quickstart

First you should build the docker image for the API:

  1. make build

This only needs to be run once, or any time you make changes to the
dependencies in the newapi/build_runnner.sh script.

To populate the database with some sample data (this is needed for running many
of the tests), you should run:

  1. make initdb

This also needs to only be run once.

At this point you have a fully setup development environment.

You can run the full test suite via:

  1. make tests

If you care to only run a specific test, that can be done using the pytest
-k option, passed in as a T env var to make:

  1. T="-k test_my_test_name" make tests

If you want to run a local instance of the OONI API, this can be done via:

  1. make serve