Metadata-Version: 2.4
Name: telvri-security
Version: 1.0.1
Summary: Official Telvri Security SDK for SIM-swap and mobile identity checks.
Home-page: 
Author: Telvri Security
Author-email: team@openapitools.org
License-Expression: MIT
Project-URL: Homepage, https://telvrisecurity.vercel.app
Project-URL: Repository, https://github.com/Granville-Christopher/telvri-python
Keywords: telvri,sim-swap,identity-security,fraud,openapi
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: urllib3<3.0.0,>=2.1.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2.11
Requires-Dist: typing-extensions>=4.7.1
Dynamic: author-email
Dynamic: license-file

# telvri-security

Official Python SDK for the [Telvri Security API](https://telvrisecurity.vercel.app) — real-time SIM-swap and mobile identity risk checks for login recovery, payouts, and wallet protection.

## Install

```bash
pip install telvri-security
```

Requires Python 3.9+.

## Quick start — SIM-swap check

Run a SIM-swap risk check before a sensitive action. Authenticate with your `rt_live_` API key.

```python
import os
import telvri_security
from telvri_security.models.check_sim_swap_dto import CheckSimSwapDto
from telvri_security.rest import ApiException

configuration = telvri_security.Configuration(
    host="https://telvrisecurity.vercel.app",
)
configuration.api_key["X-API-Key"] = os.environ["TELVRI_API_KEY"]

with telvri_security.ApiClient(configuration) as api_client:
    api = telvri_security.SIMSwapIntelligenceApi(api_client)

    try:
        result = api.sim_swap_controller_check_sim_swap(
            CheckSimSwapDto(phoneNumber="+2348031234569", maxAgeHours=24),
        )
        print(result)
    except ApiException as error:
        # 400 = invalid request body, 401 = missing/invalid API key
        print(f"SIM-swap check failed: {error}")
```

The response looks like:

```python
SimSwapResponseDto(
    phone_number="+2348031234569",
    swapped=False,
    last_swapped_at="2026-07-14T16:27:00.000Z",
    provider="MTN Nigeria",
    operator="MTN Nigeria",
)
```

Use the decision to gate the flow:

```python
if result.swapped:
    ...  # Step up verification or block the action
else:
    ...  # Allow the recovery / payout / withdrawal
```

## Authentication

The API accepts either an API key header or a bearer token.

```python
# Option A: X-API-Key header (recommended)
configuration = telvri_security.Configuration(host="https://telvrisecurity.vercel.app")
configuration.api_key["X-API-Key"] = os.environ["TELVRI_API_KEY"]

# Option B: Authorization: Bearer <KEY>
configuration = telvri_security.Configuration(
    host="https://telvrisecurity.vercel.app",
    access_token=os.environ["TELVRI_API_KEY"],
)
```

## API reference

All URIs are relative to `https://telvrisecurity.vercel.app`.

| Class | Method | HTTP request | Description |
|-------|--------|--------------|-------------|
| `SIMSwapIntelligenceApi` | `sim_swap_controller_check_sim_swap` | `POST /v1/security/sim-check` | Run a real-time SIM-swap risk check |
| `DeveloperAuthApi` | `auth_controller_login` | `POST /auth/login` | Authenticate a developer account |
| `DeveloperAuthApi` | `auth_controller_signup` | `POST /auth/signup` | Create a developer account |

### Models

- `CheckSimSwapDto`
- `SimSwapResponseDto`
- `LoginDto`
- `SignupDto`

Full per-method and per-model docs are in the [`docs/`](./docs) folder.

## Development

This SDK is generated from the Telvri Security OpenAPI contract using [OpenAPI Generator](https://openapi-generator.tech). To regenerate from the API project, run `npm run sdk:generate` in the main repository.

- API version: `1.0`
- Package version: `1.0.0`

## License

MIT © Telvri Security. See [LICENSE](./LICENSE).
