alt tag Client Libraries

Important: All Cloudant documentation has moved to the IBM Bluemix platform. You can find the new content here, and the ‘Client Libraries’ topic in particular here.

Content on this page will no longer be updated (Jan 31st, 2017).

Client libraries are the tools that let you develop your own applications to work with Cloudant databases.

The following client libraries are formally supported by Cloudant.

A supported library is one where you can contact Cloudant if you encounter a specific, reproducible problem in the latest version of the library.

Other client libraries have been created by third parties or are no longer officially supported.

If a library for your preferred language is not available, why not let us know?

Supported client libraries

Important: All Cloudant documentation has moved to the IBM Bluemix platform. You can find the new content here, and the ‘Supported client libraries’ topic in particular here.

Content on this page will no longer be updated (Jan 31st, 2017).

Mobile

The Cloudant Sync library is used to store, index and query local JSON data on a mobile device. It is also used to synchronise data between many devices. Synchronisation is controlled by your application. The library also provides helper methods for finding and resolving conflicts, both in the local device and the remote database.

Two versions are available:

An overview of Cloudant Sync is available, as are details of resources.

Java

java-cloudant is the official Cloudant library for Java.

Information about installing the library by adding it as a dependency to your maven or gradle builds is available here, along with details and examples of how to use the library.

Libraries and Frameworks Examples and Tutorials
Supported: Unsupported:

Node.js

nodejs-cloudant is the official Cloudant library for Node.js. You can install it with npm:

npm install cloudant

Libraries and Frameworks Examples and Tutorials

Python

A supported library for working with Cloudant using Python is available here.

Download the current library release here. Learn more information about the Python language at python.org.

Swift

A supported library is available for working with Cloudant. The library is called SwiftCloudant, and is installed using cocoapods.

The Podfile entry is:

pod 'SwiftCloudant'

More information about SwiftCloudant, including details of installation and how to use the library to store, index, and query remote JSON data on Cloudant, is available here.

The library is an early release version. As such, it does not currently have complete Cloudant API coverage.

Third-party client libraries

Important: All Cloudant documentation has moved to the IBM Bluemix platform. You can find the new content here, and the ‘Third-party client libraries’ topic in particular here.

Content on this page will no longer be updated (Jan 31st, 2017).

Third-party Mobile libraries

Working with a Cloudant database: IBM Worklight Powered Native Objective-C iOS Apps with a Cloudant Adapter.

C# / .NET

MyCouch is an asynchronous CouchDB and Cloudant client for .Net.

To install the library, open up the Package manager console, and invoke:

install-package mycouch.cloudant

Libraries and Frameworks Examples and Tutorials

PHP

Sag is PHP’s CouchDB and Cloudant client. Sag.js is Sag’s JavaScript counterpart.

To install, download sag from http://www.saggingcouch.com/download.php then include the library in your application:

require_once('./src/Sag.php');

Libraries and Frameworks Examples and Tutorials

JavaScript

PouchDB is a JavaScript database that can sync with Cloudant, meaning you can make your apps offline-ready just by using PouchDB. For more info, see our blog post on PouchDB.

To obtain PouchDB, and for setup details, refer to PouchDB.

Libraries and Frameworks Examples and Tutorials
  • CRUD using jQuery.
  • CSVtoCloudant - UI for importing .csv files into Cloudant. The app can also be accessed here.
  • csv2couchdb - UI from Mango Systems to import .csv files to CouchDB/Cloudant.
  • songblog - example app using JQuery.
  • PouchDB Getting Started Guide - example Todo application that syncs from browser to Cloudant or CouchDB.
  • locationtracker - example app to record and map location using PouchDB, CouchApp, and Cloudant.

Ruby

CouchRest is a CouchDB and Cloudant client with extensions for working with Rails using CouchRest Model.

To install CouchRest, run the command:

gem install couchrest

Libraries and Frameworks Examples and Tutorials

Meteor

cloudant:couchdb is the Cloudant library for the couchdb-meteor package. Since Apache CouchDB does not ship with Meteor or the couchdb package, you must provide a URL for Meteor to connect to and a running CouchDB or Cloudant server instance before you install Meteor. Add this package to your Meteor application:

meteor add cloudant:couchdb

The couchdb-meteor package provides:

Note: The JSON query syntax used by Cloudant Query, and initially developed by Cloudant, was contributed back to Apache CouchDB for version 2.0. Pre-built binaries for Apache CouchDB version 2.0 are not yet available. You can use this module with Cloudant DBaaS or Cloudant Local until the pre-built binaries are available.

To configure the Apache CouchDB or Cloudant server connection information, pass its URL as the COUCHDB_URL environment variable to the Meteor server process.

$export COUCHDB_URL=https://<account>.cloudant.com

See API Reference for more information about meteor-couchdb APIs.

Apache Spark

spark-cloudant is the official Cloudant library for Apache Spark.

The spark-cloudant library is already loaded into the IBM Bluemix Apache Spark-as-a-Service offering. It can be used with any stand-alone Spark cluster.

See the project information and Spark Packages for more details.