Metadata-Version: 2.4
Name: contackd-sync
Version: 0.1.0
Summary: Python SDK for Contackd Sync
Project-URL: Homepage, https://example.com/contackd-sync
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Requires-Dist: urllib3>=2.0.0

# contackd-sync

Python SDK for the Contackd Sync API.

## Installation

```bash
pip install requests urllib3
```

Or install the package from this repository once published as a build artifact.

## Quick Start

```python
from contackd_sync import ContackdClient, Contact

client = ContackdClient(
    api_key="sk-your-key",
    base_url="https://api.yourapp.com/v1",
)

contact = client.contacts.upsert(Contact(email="alice@example.com", first_name="Alice"))
print(contact)
```

## Public API

The package exports the main client, typed resource wrappers, models, sync helpers, and exceptions from `contackd_sync`.

- `ContackdClient`
- `ContactsResource`, `LeadsResource`, `ProspectsResource`
- `Contact`, `Lead`, `Prospect`
- `LeadStatus`, `PipelineStage`
- `SyncEngine`, `SyncResult`, `BulkResult`
- `ContackdError` and specialized exceptions

## API Key Provisioning

Create and revoke SDK keys from backend auth endpoints:

1. Create key (JWT required):
```bash
curl -X POST http://localhost:8000/api/v1/auth/api-keys \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"name":"py-sdk"}'
```

2. Delete/revoke key:
```bash
curl -X DELETE http://localhost:8000/api/v1/auth/api-keys/<API_KEY_ID> \
  -H "Authorization: Bearer <ACCESS_TOKEN>"
```

Use returned `api_key` as `api_key` when creating `ContackdClient`.
