kruxpy

Kruxpy is a library for dealing with the Krux / Salesforce DMP API


License
MIT
Install
pip install kruxpy==0.0.1

Documentation

Kruxpy

Build Status

A python library for working with the Salesforce DMP API. You will need an API Key - which your Salesforce DMP Solutions Representative will have to provide.

Installation

pip install kruxpy

Example Usage

from kruxpy.client import Client

c = Client('username', 'password', 'apikey')

# This will return all 1st/3rd party segments
print(c.audiences)

# returns a list of sites
print(c.sites)

# get a list of segment overlaps for a given segment
print(c.get_audience_distribution('12345'))

# get a list of events
print(c.events)

Logging

This library uses the standard Python logging library. To see debut output printed to STDOUT, for instance, use:

import logging

log = logging.getLogger('kruxpy')
log.setLevel(logging.DEBUG)
log.addHandler(logging.StreamHandler())

Running Tests

To run tests:

pip install -r dev-requirements.txt
python -m unittest