Metadata-Version: 2.4
Name: redatlas
Version: 0.1.1
Summary: RED Atlas External API
Home-page: https://github.com/red-atlas/red-atlas-sdks
Author: RED Atlas
Author-email: RED Atlas <engineering@atlas.red>
License: ISC
Project-URL: Repository, https://github.com/red-atlas/red-atlas-sdks
Keywords: OpenAPI,OpenAPI-Generator,RED Atlas External API
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: urllib3<3.0.0,>=2.1.0
Requires-Dist: python-dateutil>=2.8.2
Requires-Dist: pydantic>=2
Requires-Dist: typing-extensions>=4.7.1
Dynamic: author
Dynamic: home-page

# redatlas

Official Python SDK for the RED Atlas External API.

## Install

```bash
pip install redatlas
```

## Quickstart

```python
from redatlas import RedAtlasClient

client = RedAtlasClient(
    base_url="https://your-api-base-url/external-api",
    api_key="ra_live_...",
)

health = client.health.get()
print(health.status)
```

## Authentication

Use one of these auth options:

- `api_key` for Data API and report access
- `access_token` for authenticated account flows
- `refresh_token` for refresh/logout flows
- `admin_key` for changelog admin endpoints

```python
from redatlas import RedAtlasClient
from redatlas.models.login_request import LoginRequest

client = RedAtlasClient(base_url="https://your-api-base-url/external-api")
session = client.auth.login(
    LoginRequest(email="you@example.com", password="secret")
)

print(session.data.access_token)
```

## Examples

```python
from redatlas import RedAtlasClient

client = RedAtlasClient(
    base_url="https://your-api-base-url/external-api",
    api_key="ra_live_...",
)

plans = client.plans.list()
market = client.data.market("col")
records = client.data.list("col", "listings", limit=3)

print(len(plans.data))
print(market.data.available_entities)
print(len(records.data))
```

Typed request models are available under `redatlas.models`.

## Configuration

`RedAtlasClient` resolves the base URL in this order:

1. explicit `base_url`
2. `RED_ATLAS_BASE_URL`
3. SDK default fallback

Passing `base_url` explicitly is recommended.

## Notes

- The public entrypoint is `RedAtlasClient`
- The SDK also exposes generated typed request and response models
- Integration tests in this repo verify that wrapper methods forward requests to the expected endpoints with the expected params
