Metadata-Version: 2.4
Name: wtwco-igloo
Version: 2.1.0
Summary: Python SDK for Igloo Cloud
License: MIT
License-File: LICENSE.txt
Author: WTW
Author-email: software.support@wtwco.com
Requires-Python: >=3.10,<3.14
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: aiofiles (>=24.1.0,<25.0.0)
Requires-Dist: aiohttp (>=3.13.3,<4.0.0)
Requires-Dist: azure-core (>=1.38.0,<2.0.0)
Requires-Dist: azure-storage-blob (>=12.20.0,<13.0.0)
Requires-Dist: cryptography (>=44.0.1,<45.0.0)
Requires-Dist: msal[broker] (>=1.33.0,<2.0.0)
Requires-Dist: pydantic (>=2.9.2,<3.0.0)
Requires-Dist: urllib3 (>=2.6.3,<3.0.0)
Requires-Dist: wtwco-igloo-cloud-api-client (==5.0.0)
Description-Content-Type: text/markdown

# Igloo Python Connector

Igloo Python Connector is a Python wrapper for the Igloo Cloud API. It also provides additional useful methods and examples.

## Installation

Note, we assume you have a version of Python >= 3.10 and < 3.14 already installed on your machine. If not, please download and install Python 3.13 from the [official website](https://www.python.org/downloads/).
Also note, we recommend that you perform the installation within a Python virtual environment. [See here for more info](https://docs.python.org/3/library/venv.html#creating-virtual-environments).

Once created, please activate your virtual environment and install the Igloo Python Connector package using the following command:

```shell
pip install wtwco-igloo
```

You should now be able to import the package in your Python code:

```python
import wtwco_igloo
```

## Connecting to the API

Connect to the API with device code flow:

```python
from wtwco_igloo import Connection

connection = Connection.from_device_code(api_url, client_id, tenant_id)

# View your workspaces
print(connection.get_workspaces())
```

## Documentation and Examples

For documentation and examples please see [WTW Client Services](https://clientservices.insurancetechnology.com/).

## Release Notes

### 2.1

#### Improvements
1. Interactive token is now the default authentication method used throughout the example code.
1. New methods and an example (`documentation_example.py`) for getting all table documentation for a given model or project.
1. Improved support for copying runs and projects with files between environments and workspaces.
1. Improvements to Calculation Pools:
    - New `CalculationPool` class with information such as cores and memory.
    - Methods that perform calculations allow for a pool to be specified by name or id.
1. Improvements to the `Run` class:
    - New method `finalize` for finalizing a run.
    - Several new methods for getting run results.
    - Two new methods (`run_results_to_csv` and `run_result_table_nodes_to_csv`) for exporting run results to CSV.
    - Comparison of run results with string values is now allowed.
    - And other quality of life improvements.
1. Improvements to the `Project` class:
    - New properties added, including `model` and `contains_finalized_runs`.
    - Support for default pools with `default_pool_name` and `default_pool_id` properties.
    - New method `update` for refreshing state.
1. New `get_or_create_project` method added to both `Connection` and `Workspace` classes.
1. New method `update` added to the UploadedFile class for refreshing state.
1. String comparisons for object names are case-insensitive.
1. Added `get_..._by_id` methods for fetching pools, workspace, projects, files, and runs by id.
1. Customisable backoff retrying for the following HTTP response status codes 429, 502, 503, 504.

#### Compatibility
1. Support for Python 3.9 dropped as it is now [end-of-life](https://devguide.python.org/versions/).

#### Bugfixes
1. Fixed bug with empty workspaces failing to list projects.
1. Fixed bug when copying projects with the same name across environments.
1. Fixed bug where newly uploaded files would have `upload_status` be `'UploadNotStarted'`.

#### Security
1. Updated third-party package dependencies to pick up upstream security and stability fixes.

