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

# Python SDK Getting Started

> Installation guide and prerequisites for using the CloudQuant Data Liberator Python API from your own environment.

# Python SDK getting started

The CloudQuant Data Liberator Python SDK provides the simplest way to query and work with CloudQuant datasets from any Python environment.

## Prerequisites

* Python 3

## Installation

Install the third-party dependencies Liberator needs. The `liberator.py` client itself is not on PyPI — download it from your Liberator Profile page (see [Required security files](#required-security-files) below).

<CodeGroup>
  ```bash Conda theme={null}
  conda create -n liberator python=3.7
  conda activate liberator
  conda install -c anaconda requests pyopenssl cryptography six pytz
  conda install pandas
  conda install -c conda-forge httpx async_generator pyarrow=8.0.0
  ```

  ```bash pip theme={null}
  python -m venv liberator
  source liberator/bin/activate  # Windows: liberator\Scripts\activate
  pip install requests pandas httpx async_generator "pyarrow==8.0.0" pyOpenSSL cryptography six pytz
  ```
</CodeGroup>

## Required security files

You need the following files from your Downloads ZIP file:

* **`liberator.py`** — The CloudQuant Data Liberator API for Python
* **`liberator.json`** — Contains your Username and Token
* **`liberator.pfx`** — Security certificate (only required for releases prior to 2.0)

Place `liberator.py` in the same folder as your code or in your Python `site-packages` directory. Place `liberator.json` (and `liberator.pfx` if needed) in your **working directory**, or set explicit paths before querying:

```python theme={null}
import liberator

liberator.auth = '/path/to/liberator.json'
liberator.pfx = '/path/to/liberator.pfx'  # releases prior to 2.0 only
```

<Warning>
  `liberator.json` is resolved from your working directory unless you set `liberator.auth`.
</Warning>

<Note>
  As of release version 2.0, `liberator.pfx` is no longer required. If you are on a release prior to 2.0, you must also include `liberator.pfx` in your working directory.
</Note>

When using Jupyter Notebooks, set the working directory to the location containing `liberator.json` (and `liberator.pfx` if you are on a release prior to 2.0). See [this reference](https://kegui.medium.com/change-jupyter-notebook-startup-folder-windows-608dfcfdc104) for changing the Jupyter Notebook startup folder on Windows.

## Optional: CloudQuant charting

If using CloudQuant Charting (included with the API), install these additional packages:

<CodeGroup>
  ```bash Conda theme={null}
  conda install plotly numpy
  conda install -c conda-forge ta-lib
  ```

  ```bash pip theme={null}
  pip install plotly numpy TA-Lib
  ```
</CodeGroup>

<Note>
  `TA-Lib` on pip requires the [ta-lib C library](https://github.com/TA-Lib/ta-lib-python) to be installed first. Conda installs both the library and Python bindings together.
</Note>

## Quick start

```python theme={null}
import liberator

df = liberator.get_dataframe(
    liberator.query(
        name='daily_bars',
        as_of='2020-11-15',
        symbols=['AAPL']
    )
)

print(df)
```
