Core API Client Libraries

Our Core API is extremely simple to integrate with as is, but there are also many client libraries available for Sift that make the process even easier. These libraries will help you send sift events and labels, as well as allowing you to get user's scores!

Python

The Python client library is available either through pip or easy_install.

Installing with Pip

Python 2:

pip install sift

Python 3:

pip3 install sift

Installing with Easy Install

sudo easy_install sift

Check out the Python API docs, or head to the source on GitHub.

Ruby

The Ruby client library is available either through RubyGems or Bundler.

Installing with RubyGems

gem install sift

Installing with Bundler

If you are using Bundler, add this line to your Gemfile:

gem 'sift', '>= 2', '< 3'

Check out the Ruby API docs, or head to the source on GitHub.

PHP

The PHP client library is available either through Composer or by manually including it in your project.

Installing with Composer

To install the PHP client library with Composer:

  1. Add siftscience/sift-php as a dependency in composer.json.
    "require": {
      ...
      "siftscience/sift-php" : "2.*"
      ...
    )
  2. Run composer update.

Installing Manually

To install the PHP client library with Composer:

  1. Download the latest release
  2. Extract into a folder in your project root named "sift-php"
  3. Include the following files in your project
    require 'sift-php/lib/Services_JSON-1.0.3/JSON.php';
    require 'sift-php/lib/SiftRequest.php';
    require 'sift-php/lib/SiftResponse.php';
    require 'sift-php/lib/SiftClient.php';
    require 'sift-php/lib/Sift.php';

Check out the PHP API docs, or head to the source on GitHub.

Java

The Java client library is available through Maven Central or manual Jar installation.

Maven Installation

To use the Java client in a Maven project, put the following dependency into your pom.xml file.

<dependencies>
  ...
  <dependency>
      <groupId>com.siftscience</groupId>
      <artifactId>sift-java</artifactId>
      <version>3.16.0</version>
  </dependency>
  ...
</dependencies>

Gradle Installation

To use the Java client in a Gradle project, put the following dependency into your build.gradle file.

dependencies {
  ...
  compile 'com.siftscience:sift-java:3.15.2'
  ...
}

Manual Jar Installation

View the manual installation docs on GitHub.


Check out the Java API docs, or head to the source on GitHub.