> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing peaq SDK

> Install the peaq SDK for JavaScript or Python. Set up a Node.js project or virtual environment to run DID, RBAC, and storage operations.

The peaq SDKs cover DID, RBAC, and Storage operations on peaq chain, in JavaScript and Python. For the full API, see the [SDK Reference](https://docs.peaq.xyz/peaqchain/sdk-reference/home.md).

## JavaScript

Prerequisite: [Node.js](https://nodejs.org/en/download/package-manager) 18 or later.

**1. Create a Node.js project**

Run `npm init -y` to create a Node.js project.

**2. Install the SDK**

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
npm i @peaq-network/sdk
```

**3. Enable ES Modules**

In `package.json`, add `"type": "module"`.

**4. Write and run your code**

Put your SDK code in a `.js` file and run it with `node file_name.js`.

For what the JavaScript SDK can do, see the [JavaScript SDK Reference](https://docs.peaq.xyz/peaqchain/sdk-reference/javascript/create-instance.md).

## Python

Prerequisite: [Python](https://www.python.org/downloads/) 3.10 or later.

**1. Set up a virtual environment**

Mac/Linux:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
python -m venv peaq
source peaq/bin/activate
```

Windows:

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
python -m venv peaq
peaq\Scripts\activate
```

**2. Install the SDK**

The examples on these pages are written for version `0.2.1`, and the 1.x API differs, so pin the version to run them as written.

```bash theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
pip install peaq-sdk==0.2.1
```

**3. Add environment variable support**

The reference examples read their keys and URLs from a `.env` file. Add `python-dotenv==1.1.0` to `requirements.txt` and install it with `pip install -r requirements.txt`.

**4. Write and run your code**

Put your SDK code in a `.py` file and run it with `python file_name.py`.

For what the Python SDK can do, see the [Python SDK Reference](https://docs.peaq.xyz/peaqchain/sdk-reference/python/create-instance.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.