<br />

This page shows how to install client libraries for the Memorystore for Memcached 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](https://docs.cloud.google.com/cpp/docs/setup.md.txt)
for details about this client library's requirements and install dependencies.

### C#

Install the `Google.Cloud.Memcache.V1` package in Visual Studio. See the Google Cloud .NET Memcached [Installation](https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.Memcache.V1/index.html#installation) documentation for more details.

### Go

```sh
go get cloud.google.com/go/memcache/apiv1
```

### Java

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

```java
<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.google.cloud</groupId>
      <artifactId>libraries-bom</artifactId>
      <version>20.8.0</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>
 
<dependencies>
  <dependency>
    <groupId>com.google.cloud</groupId>
    <artifactId>google-cloud-memcache</artifactId>
  </dependency>
```

If you are using Maven without BOM, add this to your dependencies:

```java
<dependency>
  <groupId>com.google.cloud</groupId>
  <artifactId>google-cloud-memcache</artifactId>
  <version>0.2.1</version>
</dependency>
```

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

```java
  compile 'com.google.cloud:google-cloud-memcache:0.2.1'
```

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

```java
  libraryDependencies += "com.google.cloud" % "google-cloud-memcache" % "0.2.1"
```

### Node.js

```sh
npm install @google-cloud/memcache
```

### Python

For more on setting up your Python development environment, refer to [Python Development Environment Setup Guide](https://docs.cloud.google.com/python/docs/setup.md.txt).   

Mac/Linux

```python
pip install virtualenv
virtualenv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install google-cloud-memcache
```
Windows

```python
pip install virtualenv
virtualenv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install google-cloud-memcache
```

### Rust

```sh
cargo add google-cloud-memcache-v1
```

<br />

## Setting up authentication

1.
   [Install](https://docs.cloud.google.com/sdk/docs/install) the Google Cloud CLI.

   After installation,
   [initialize](https://docs.cloud.google.com/sdk/docs/initializing) the Google Cloud CLI by running the following command:

   ```bash
   gcloud init
   ```


   If you're using an external identity provider (IdP), you must first
   [sign in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud.md.txt).
2.

   If you're using a local shell, then create local authentication credentials for your user
   account:

   ```bash
   gcloud auth application-default login
   ```

   You don't need to do this if you're using Cloud Shell.


   If an authentication error is returned, and you are using an external identity provider
   (IdP), confirm that you have
   [signed in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud.md.txt).


   A sign-in screen appears. After you sign in, your credentials are stored in the
   [local credential file used by ADC](https://docs.cloud.google.com/docs/authentication/application-default-credentials.md.txt#personal).

## Additional Resources

### C++

- [API Reference Documentation](https://docs.cloud.google.com/cpp/docs/reference/memcache/latest.md.txt)
- [Source Code](https://github.com/googleapis/google-cloud-cpp)
- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-cpp/issues)
- [Stack Overflow](https://stackoverflow.com/search?q=%5Bgoogle-cloud-memorystore%5D%5Bc%2B%2B%5D)

### C#

- [API Reference Documentation](https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.Memcache.V1/index.html)
- [Source Code](https://github.com/googleapis/google-cloud-dotnet/tree/master/apis/Google.Cloud.Memcache.V1)
- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-dotnet/issues)
- [Stack Overflow](http://stackoverflow.com/search?q=%5Bgoogle-cloud-memorystore%5D+%5Bc%23%5D)

### Go

- [API Reference Documentation](https://pkg.go.dev/cloud.google.com/go/memcache/apiv1?tab=doc)
- [Source Code](https://github.com/googleapis/google-cloud-go/tree/master/memcache/apiv1)
- [GitHub Issue Tracker](https://github.com/GoogleCloudPlatform/google-cloud-go/issues)
- [Stack Overflow](http://stackoverflow.com/search?q=%5Bgoogle-cloud-memorystore%5D+%5Bgo%5D)

### Java

- [API Reference Documentation](https://cloud.google.com/java/docs/reference/google-cloud-memcache/latest/overview)
- [Source Code](https://github.com/googleapis/java-memcache)
- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-java/issues)
- [Stack Overflow](http://stackoverflow.com/search?q=%5Bgoogle-cloud-memorystore%5D+%5Bjava%5D)

### Node.js

- [API Reference Documentation](https://googleapis.dev/nodejs/memcache/latest/index.html)
- [Source Code](https://github.com/googleapis/nodejs-memcache)
- [GitHub Issue Tracker](https://github.com/googleapis/nodejs-memcache/issues)
- [Stack Overflow](http://stackoverflow.com/search?q=%5Bgoogle-cloud-memorystore%5D+%5Bnode.js%5D)

### Python

- [API Reference Documentation](https://pypi.org/project/google-cloud-memcache/)
- [Source Code](https://github.com/googleapis/python-memcache/)
- [GitHub Issue Tracker](https://github.com/GoogleCloudPlatform/google-cloud-python/issues)
- [Stack Overflow](http://stackoverflow.com/search?q=%5Bgoogle-cloud-memorystore%5D+%5Bpython%5D)

### Rust

- [API Reference Documentation](https://docs.rs/google-cloud-memcache-v1/latest)
- [Source Code](https://github.com/googleapis/google-cloud-rust/tree/main/src/generated/cloud/memcache/v1)
- [GitHub Issue Tracker](https://github.com/googleapis/google-cloud-rust/issues)

<br />