> ## Documentation Index
> Fetch the complete documentation index at: https://runpod-b18f5ded-promptless-websocket-streaming-tutorial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Use the Runpod Python SDK to build Serverless applications.

Get started with setting up your Runpod projects using Python. Depending on the specific needs of your project, there are various ways to interact with the Runpod platform. This guide provides an approach to get you up and running.

## Install the Runpod SDK

Create a Python virtual environment to install the Runpod SDK library. Virtual environments allow you to manage dependencies for different projects separately, avoiding conflicts between project requirements.

To get started, install setup a virtual environment then install the Runpod SDK library.

<Tabs>
  <Tab title="macOS">
    Create a Python virtual environment with [venv](https://docs.python.org/3/library/venv.html):

    ```bash theme={null}
    python3 -m venv env
    source env/bin/activate
    ```
  </Tab>

  <Tab title="Windows">
    Create a Python virtual environment with [venv](https://docs.python.org/3/library/venv.html):

    ```bash theme={null}
    python -m venv env
    env\Scripts\activate
    ```
  </Tab>

  <Tab title="Linux">
    Create a Python virtual environment with [venv](https://docs.python.org/3/library/venv.html):

    ```bash theme={null}
    python3 -m venv env
    source env/bin/activate
    ```
  </Tab>
</Tabs>

To install the SDK, run the following command from the terminal.

```bash theme={null}
python -m pip install runpod
```

You should have the Runpod SDK installed and ready to use.

## Get Runpod SDK version

To ensure you've setup your Runpod SDK in Python, choose from one of the following methods to print the Runpod Python SDK version to your terminal.

<Tabs>
  <Tab title="Pip">
    Run the following command using pip to get the Runpod SDK version.

    ```bash theme={null}
    pip show runpod
    ```

    You should see something similar to the following output.

    ```bash theme={null}
    runpod==1.7.9
    ```
  </Tab>

  <Tab title="Shell">
    Run the following command from your terminal to get the Runpod SDK version.

    ```bash theme={null}
    python3 -c "import runpod; print(runpod.__version__)"
    ```
  </Tab>

  <Tab title="Python">
    To ensure you've setup your installation correctly, get the Runpod SDK version. Create a new file called `main.py`. Add the following to your Python file and execute the script.

    ```py theme={null}
    import runpod

    version = runpod.version.get_version()

    print(f"Runpod version number: {version}")
    ```

    You should see something similar to the following output.

    ```sh theme={null}
    Runpod version number: 1.X.0
    ```
  </Tab>
</Tabs>

You can find the latest version of the Runpod Python SDK on [GitHub](https://github.com/runpod/runpod-python/releases).

Now that you've installed the Runpod SDK, add your API key.

## Add your API key

Set `api_key` and reference its variable in your Python application. This authenticates your requests to the Runpod platform and allows you to access the [Runpod API](/sdks/python/apis).

```python theme={null}
import runpod
import os

runpod.api_key = os.getenv("RUNPOD_API_KEY")
```

<Info>
  It's recommended to use environment variables to set your API key. You shouldn't load your API key directly into your code.

  For these examples, the API key loads from an environment variable called `RUNPOD_API_KEY`.
</Info>

Now that you've have the Runpod Python SDK installed and configured, you can start using the Runpod platform.

For more information, see:

* [APIs](/sdks/python/apis)
* [Endpoints](/sdks/python/endpoints)
