Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Storing and querying data for the Performance Platform
Python Other
tag: release_19

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
backdrop
collectors
features
tests
.gitignore
Procfile-read
Procfile-write
README.md
add-data.sh
jenkins.sh
pep-it.sh
requirements.txt
requirements_for_production.txt
requirements_for_tests.txt
run_tests.sh
start-app.sh
start.py

README.md

A minimal repo for spiking out getting hold of some licencing performance data.

  1. sudo pip install -r requirements.txt
  2. Get client secrets from your Google API Console by creating a new project, turning on Analytics API, going to "API access" and creating an OAuth client ID (name is irrelevant, application type is "Installed application") and click "Download JSON".
  3. Put the obtained client_secrets.json into the collectors folder.
  4. Check you can fetch the sample data with python licensing_location_data.py. This should output JSON.
  5. Put the sample data into mongo with sh shove-data-into-mongo.sh.

Would you like a crontab to collect data each month? ./set-crontab.sh

The APIs

Getting set up

This assumes you are using the GDS dev environment and so have python and mongo installed.

  1. Check that you have virtualenv installed, if not sudo apt-get install python-virtualenv.
  2. Navigate to the performance-platform directory and run ./run_tests.sh. This will create a new virtualenv, install all dependencies and run the tests.
  3. source venv/bin/activate to enable the virtualenv.
Something went wrong with that request. Please try again.