Metadata-Version: 2.4
Name: wcp-library
Version: 1.15.0
Summary: Common utilites for internal development at WCP
Author: Mitch-Petersen
Author-email: mitch.petersen@wcap.ca
Requires-Python: >=3.12.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Requires-Dist: aiofiles (>=25.1.0,<26.0.0)
Requires-Dist: aiohttp (>=3.14.3,<4.0.0)
Requires-Dist: cryptography (>=50.0.0,<51.0.0)
Requires-Dist: ftputil (>=5.2.0,<6.0.0)
Requires-Dist: oracledb (>=3.4.2,<4.0.0)
Requires-Dist: pandas (>=2.3.3,<3.0.0)
Requires-Dist: paramiko (>=5.0.0,<6.0.0)
Requires-Dist: psycopg (>=3.3.4,<4.0.0)
Requires-Dist: psycopg-binary (>=3.3.4,<4.0.0)
Requires-Dist: psycopg-pool (>=3.3.1,<4.0.0)
Requires-Dist: pycryptodome (>=3.23.0,<4.0.0)
Requires-Dist: pytz (>=2025.2,<2026.0)
Requires-Dist: requests (==2.34.2)
Requires-Dist: selenium (>=4.44.0,<5.0.0)
Requires-Dist: tenacity (>=9.1.4,<9.2.0)
Requires-Dist: yarl (>=1.24.2,<2.0.0)
Description-Content-Type: text/markdown

# WCP-Library

## Description
Commonly used functions for the D&A team.

## Installation
`pip install WCP-Library`

Requires Python 3.12 or newer.

## Modules

| Module | Purpose |
| --- | --- |
| `wcp_library` | `APPLICATION_PATH` for deployment-independent paths, and `divide_chunks` for batching a list. |
| `wcp_library.credentials` | Password Vault credential managers — API, FTP/SFTP, Internet, Oracle, Postgres, and Windows — each with a synchronous and an asynchronous flavour. |
| `wcp_library.sql` | Oracle and Postgres connection classes, sync and async, with optional connection pooling, explicit transactions, and dataframe import/upsert helpers. |
| `wcp_library.ftp` | `FTP` and `SFTP` clients for listing, downloading, and uploading files. |
| `wcp_library.graph` | Microsoft Graph helpers: authentication, SharePoint sites/files/lists, Outlook mail and attachments, and webhook subscription lifecycle management. |
| `wcp_library.browser_automation` | Selenium sessions for Chrome, Firefox, and Edge, plus locator-based and `WebElement`-based interaction helpers. |
| `wcp_library.emailing` | `MailServer` for sending mail through SMTP2GO, including a styled HTML error report. |
| `wcp_library.logging` | `create_log` for standard file and console logging setup. |
| `wcp_library.time` | Timezone-aware current time, timezone conversion, and UTC/local timestamp helpers. |
| `wcp_library.retry` | Tenacity retry strategies shared by the SQL, Graph, and browser automation modules. |

## Usage
See [Wiki](https://github.com/Whitecap-DNA/WCP-Library/wiki/) for more information.

## Development

Install dependencies and run the test suite with Poetry:

```
poetry install
poetry run pytest
```

## Authors and acknowledgment
Mitch Petersen

## Stakeholders
D&A Developers

## Project status
In Development

