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

# Alloy Python SDK

> This SDK provides a Python interface for interacting with Alloy APIs. It's designed for flexibility and easy integration into Python projects. Source available on [Github](https://github.com/alloy-automation/alloy-python), package distributed via [PyPI](https://pypi.org/project/alloy-python/).

### Installation

The Alloy Python SDK can be easily installed using pip:

```bash theme={null}
pip install alloy-python
```

### Usage

The package needs to be configured with your account's API key, which is available in the Alloy Dashboard under settings. You must supply the API key with each instantiation of the module.

To set up Alloy's Embedded iPaaS, use the code snippet below:

```python Python theme={null}
from alloy_python.embedded import Embedded

## Initialize with your API key
embedded = Embedded('YOUR_API_KEY')

## Example usage with the App class
response = embedded.App.get_apps()
print(response)
```

### Testing

#### API Key for Testing

To test the SDK, you'll need to set the `ALLOY_API_KEY` environment variable. This can be done in your terminal session:

```bash theme={null}
export ALLOY_API_KEY="your_api_key_here"
```

#### Running Test Scripts

The SDK includes a set of test scripts that you can use to verify its functionality. Before running these scripts, ensure that the `ALLOY_API_KEY` environment variable is set as described above. You may need to replace user IDs, workflow IDs, integration IDs, etc., in the test scripts with those specific to your Alloy account.

Run a test script using:

```bash theme={null}
python3 test/path_to_test_script.py
```

For example:

```bash theme={null}
python3 test/apps/get_apps.py
```
