Metadata-Version: 2.4
Name: titan-rdm-sdk
Version: 2.0.0
Summary: Python SDK for TitanRdm Upload and Download APIs
Author-email: TitanRDM <support@titanrdm.com>
License: MIT
Project-URL: Homepage, https://github.com/dimodelo/titan-rdm-sdk-python
Project-URL: Documentation, https://github.com/dimodelo/titan-rdm-sdk-python#readme
Project-URL: Repository, https://github.com/dimodelo/titan-rdm-sdk-python
Project-URL: Issues, https://github.com/dimodelo/titan-rdm-sdk-python/issues
Keywords: titan,rdm,sdk,api,data
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: boto3>=1.26.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: python-dotenv>=1.0.0; extra == "dev"
Dynamic: license-file

# TitanRDM Python SDK Documentation

The TitanRDM Python SDK enables you to programmatically integrate your data platform with TitanRDM — upload reference data, download managed datasets, and automate sync workflows across Databricks, Snowflake, BigQuery, and any pandas-compatible environment.


TitanRDM SDK provides 4 methods of integration:

1. **Direct API Calls** - Use the `TitanRDMClient` to interact with the TitanRDM API directly
2. **Convention Sync** - Use the `ConventionSync` class for pandas-based platform-agnostic synchronisation
3. **Spark Sync** - Use `SparkSync` with Spark/Catalogue-based platforms like Databricks and Microsoft Fabric
4. **Platform-Specific Sync** - Use platform-specific sync classes with convention-based synchronisation

---

## Table of Contents

- [Getting Started](getting-started.md)
- [Uploading Data](uploading-data.md)
- [Downloading Data](downloading-data.md)
- [Convention Sync (Pandas)](convention-sync.md)
- [Spark Sync (Databricks)](spark-sync.md)
- [Platform Integrations](platform-integrations.md)
- [Error Handling](error-handling.md)
- [Example Notebooks](examples.md)

---

## Architecture Overview

```
┌─────────────────────────────────────────────────────────┐
│                    Your Data Platform                     │
│  (Databricks / Snowflake / BigQuery / Python scripts)    │
└────────────────────────────┬────────────────────────────┘
                             │
                    ┌────────▼────────┐
                    │  TitanRDM SDK   │
                    │                 │
                    │  ConventionSync │  ← Any platform
                    │  SparkSync      │  ← Databricks/Fabric etc
                    │  SnowparkSync   │  ← Snowflake
                    │  BigQuerySync   │  ← BigQuery
                    └────────┬────────┘
                             │
                    ┌────────▼────────┐
                    │   TitanRDM API  │
                    └─────────────────┘
```

## Quick Example

```python
from titan_rdm_sdk import TitanRDMClient
from titan_rdm_sdk.spark_sync import SparkSync

# Authenticate
client = TitanRDMClient(
    url="https://your-tenant.titanrdm.com",
    client_id="your_client_id",
    client_secret="your_client_secret",
)

# Download all tables in a domain to your Spark catalog
sync = SparkSync(client=client, spark=spark)
sync.download_sync_by_convention(
    branch_id=branch.id,
    target_catalog="dev",
    target_schema="rdmin",
    source_domain_name="Clinics",
)
```

