Metadata-Version: 2.4
Name: wtwco-igloo
Version: 2.3.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,<4.0
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
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: aiofiles (>=24.1.0,<25.0.0)
Requires-Dist: aiohttp (>=3.14.3,<4.0.0)
Requires-Dist: authlib (>=1.7.1,<2.0.0)
Requires-Dist: azure-core (>=1.38.2,<2.0.0)
Requires-Dist: azure-storage-blob (>=12.28.0,<13.0.0)
Requires-Dist: cryptography (>=50.0.0,<51.0.0)
Requires-Dist: idna (>=3.15,<4.0)
Requires-Dist: joserfc (>=1.7.1,<2.0.0)
Requires-Dist: keyring (>=25.7.0,<26.0.0)
Requires-Dist: msal[broker] (>=1.35.1,<2.0.0)
Requires-Dist: pydantic (>=2.12.5,<3.0.0)
Requires-Dist: pyjwt (>=2.13.0,<3.0.0)
Requires-Dist: requests (>=2.33,<3.0)
Requires-Dist: urllib3 (>=2.7.0,<3.0.0)
Requires-Dist: wtwco-igloo-cloud-api-client (==7.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

To install the latest version of Python, please visit the [official website](https://www.python.org/downloads/). 
Note, this package supports Python 3.10 and above.

We recommend installing this package inside a Python virtual environment. 
For more information, see the [virtual environment documentation](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 using interactive token:

```python
from wtwco_igloo import Connection

connection = Connection.from_interactive_token(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.3

#### 2.3 - Improvements

1. Server side comparison of runs, using the Igloo Cloud comparison API:
    - Added `get_or_create_comparison_session` and `get_comparison_session_by_id` to the `Project` class. Submitting the same ordered set of runs returns the existing comparison session rather than creating another one.
    - A `ComparisonSession` class exposing the compared runs and both sides of the comparison, through `get_run_results` and `get_data_groups` and the case-insensitive lookups `get_run_result` and `get_data_group`.
    - `ComparisonRunResult` and `ComparisonResultTableNode` classes for the output side of a comparison, mirroring `RunResult` and `RunResultTableNode`.
    - `ComparisonDataGroup` and `ComparisonDataTableNode` classes, which give the input side of a comparison the same hierarchical folder and table structure as the output side, something the dictionary based data methods do not provide.
1. Added the example `comparison_session_example.py`, demonstrating a server side comparison of two runs.
1. Support for tracing references between artifacts:
    - `get_upstream_references` and `get_downstream_references` on the `Run` class.
    - `get_downstream_references` on the `UploadedFile` class.
    - Supporting `UpstreamReferences`, `DownstreamReferences`, `ReferencedRun` and `ReferencedUploadedFile` data classes.
    - An accompanying example, `artifact_references_example.py`.
1. Upload methods now accept optional `blob_client_options` and `blob_upload_options` arguments, which are passed through to the Azure `BlobClient`. These are supported by `upload_file`, `upload_files` and `upload_folder` on the `Workspace` class, and by `upload_files_to_table` and `copy_data_group_from_run` on the `Run` class.
1. A `use_sas_link` argument on `Run.get_run_result_table_data` for downloading a results table directly from Azure storage, which is faster for large tables.
1. A relaxed comparison mode for output comparisons, through the `strict` argument on `Run.compare_output_csvs` and `Run.compare_output_csvs_in_folder`, and the `strict_comparison` argument on `Project.output_all_runs`. When set to `False`, tables and rows that are only present in the second folder are ignored rather than reported as differences. Defaults to `True`.
1. Improved documentation for `Run.post_input_data` and `Project.output_all_runs`.

#### 2.3 - Behavioural changes

1. `Project.output_all_runs` and `Run.compare_output_csvs_in_folder` no longer raise `FilePathNotFoundError` when tables are missing. Missing tables are now reported as differences in the output when `strict = True`, which is the default. Such differences are reported against a file name of the form `table.csv (missing from <folder>)`, so it is clear which folder the table was missing from.
1. `Run.compare_output_csvs_in_folder` now reports tables that are only present in the second folder as differences when `strict = True`, which is the default. Previously these tables were ignored.
1. `Project.output_all_runs` and `Run.compare_output_csvs_in_folder` no longer raise `NonCsvFileError` when a folder contains a file that is not a csv. Such files are now logged and ignored.

#### 2.3 - Bugfixes

1. Fixed bug where large file uploads could fail, by streaming files to Azure storage in chunks.
1. Workspace name lookups with `get_workspace` are now case-insensitive, consistent with other name lookups.

#### 2.3 - Security

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

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

