Setting up client libraries

This page shows how to install client libraries for the Memorystore for Redis API so you can connect to the API with the language of your choice.

Installing the client library

C++

See Setting up a C++ development environment for details about this client library's requirements and install dependencies.

C#

Install the Google.Cloud.Redis.V1 package in Visual Studio

Go

go get cloud.google.com/go/redis/apiv1

Java

If you are using Maven, add this to your pom.xml file:

<dependency>
    <groupId>com.google.cloud</groupId>
    <artifactId>google-cloud-redis</artifactId>
    <version>0.62.0-alpha</version>
</dependency>

If you are using Gradle, add this to your dependencies:

compile 'com.google.cloud:google-cloud-redis:0.62.0-alpha'

If you are using SBT, add this to your dependencies:

libraryDependencies += "com.google.cloud" % "google-cloud-redis" % "0.62.0-alpha"

If you're using VS Code, IntelliJ, or Eclipse, you can add client libraries to your project using these IDE plugins:

The plugins provide additional functionality, such as key management for service accounts. Refer to each plugin's documentation for details.

Node.js

npm install --save @google-cloud/redis

PHP

composer require google/cloud-redis

Python

For more on setting up your Python development environment, refer to Python Development Environment Setup Guide.
pip install --upgrade google-cloud-redis

Ruby

gem install google-cloud-redis

Setting up authentication

  1. Install and initialize the gcloud CLI.

    When you initialize the gcloud CLI, be sure to specify a Google Cloud project in which you have permission to access the resources your application needs.

  2. Create your credential file:

    gcloud auth application-default login

    A sign-in screen appears. After you sign in, your credentials are stored in the local credential file used by ADC.

Additional Resources