dataservices-api/server/lib/python/cartodb_services
Carla Iriberri 6d35cff9c7 Exposes geocoder providers in public geocoder functions
Add config function in postgres explicitly to get MapzenGeocoderConfig.
Bump versions for client and server APIs. New MapzenGeocoderConfig
included to be able to use current QuotaServices with non-configured
users.
2016-07-05 11:13:43 +02:00
..
cartodb_services Exposes geocoder providers in public geocoder functions 2016-07-05 11:13:43 +02:00
test Add test_orgs_should_write_zero_padded_dates #204 2016-06-14 13:18:34 +02:00
README.md Instructions on how to run integration tests #204 2016-06-13 19:05:31 +02:00
requirements.txt Allow for the manipulation of datetime.date.today() #201 2016-06-13 12:57:00 +02:00
setup.py Exposes geocoder providers in public geocoder functions 2016-07-05 11:13:43 +02:00

CartoDB dataservices API python module

This directory contains the python library used by the server side of CartoDB LDS (Location Data Services).

It is used from pl/python functions contained in the cdb_dataservices_server extension. It goes hand in hand with the extension so please consider running the integration tests.

On the other hand, it is pretty independent from the client, as long as the signatures of the public pl/python functions match.

Dependencies

See the [[requirements.txt]] or better the Basically:

  • pip
  • redis and hiredis
  • dateutil
  • googlemaps
  • request

Installation

Install the requirements:

sudo pip install -r requirements.txt

Install the library:

sudo pip install .

NOTE: a system installation is required at present because the library is meant to be used from postgres pl/python, which runs an embedded python interpreter.

Running the unit tests

Just run nosetests

$ nosetests
.................................................
----------------------------------------------------------------------
Ran 49 tests in 0.131s

OK

Running the integration tests

See the ../../../../test/README.md. Basically, move to the /test directory at the top level of this repo and execute the run_tests.py script:

cd $(git rev-parse --show-toplevel)/test
python run_tests.py --host=$YOUR_HOST $YOUR_USERNAME $YOUR_API_KEY

TODO

  • Move dependencies expressed in requirements.txt to setup.py