Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,981 changes: 2,038 additions & 1,943 deletions docs-site/REPORT.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs-site/docs/api/python/modules-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ slug: /api/python/modules
- [nexla_sdk.models.users](./modules/nexla_sdk.models.users.mdx)
- [nexla_sdk.models.users.requests](./modules/nexla_sdk.models.users.requests.mdx)
- [nexla_sdk.models.users.responses](./modules/nexla_sdk.models.users.responses.mdx)
- [nexla_sdk.models.webhooks](./modules/nexla_sdk.models.webhooks.mdx)
- [nexla_sdk.models.webhooks.requests](./modules/nexla_sdk.models.webhooks.requests.mdx)
- [nexla_sdk.models.webhooks.responses](./modules/nexla_sdk.models.webhooks.responses.mdx)
- [nexla_sdk.resources](./modules/nexla_sdk.resources.mdx)
- [nexla_sdk.resources.approval_requests](./modules/nexla_sdk.resources.approval_requests.mdx)
- [nexla_sdk.resources.async_tasks](./modules/nexla_sdk.resources.async_tasks.mdx)
Expand All @@ -117,4 +120,5 @@ slug: /api/python/modules
- [nexla_sdk.resources.teams](./modules/nexla_sdk.resources.teams.mdx)
- [nexla_sdk.resources.transforms](./modules/nexla_sdk.resources.transforms.mdx)
- [nexla_sdk.resources.users](./modules/nexla_sdk.resources.users.mdx)
- [nexla_sdk.resources.webhooks](./modules/nexla_sdk.resources.webhooks.mdx)
- [nexla_sdk.telemetry](./modules/nexla_sdk.telemetry.mdx)
18 changes: 9 additions & 9 deletions docs-site/docs/api/python/modules/nexla_sdk.auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Authentication utilities for the Nexla SDK

### TokenAuthHandler

Defined in `nexla_sdk/auth.py:14`
Defined in `nexla_sdk/auth.py:15`

Handles authentication and token management for Nexla API

Expand All @@ -21,35 +21,35 @@ Supports two authentication flows as per Nexla API documentation:
1. **Service Key Flow**: Uses service keys to obtain session tokens via POST to
/token endpoint with `Authorization: Basic <Service-Key>`. Automatically
refreshes tokens before expiry using /token/refresh endpoint.

2. **Direct Token Flow**: Uses pre-obtained access tokens directly. These tokens
expire after a configured interval (usually 1 hour).

Responsible for:
- Obtaining session tokens using service keys (Basic auth)
- Using directly provided access tokens (Bearer auth)
- Using directly provided access tokens (Bearer auth)
- Refreshing session tokens before expiry (service key flow only)
- Ensuring valid tokens are available for API requests
- Handling authentication retries on 401 responses

Methods:

- `ensure_valid_token(self) -> str`
- Source: `nexla_sdk/auth.py:145`
- Source: `nexla_sdk/auth.py:154`
- Ensures a valid session token is available, refreshing if necessary
- `execute_authenticated_request(self, method: str, url: str, headers: Dict[str, str], **kwargs) -> Optional[Dict[str, Any]]`
- Source: `nexla_sdk/auth.py:191`
- Source: `nexla_sdk/auth.py:202`
- Execute a request with authentication handling
- `get_access_token(self) -> str`
- Source: `nexla_sdk/auth.py:69`
- Source: `nexla_sdk/auth.py:72`
- Get the current access token
- `logout(self) -> None`
- Source: `nexla_sdk/auth.py:170`
- Source: `nexla_sdk/auth.py:179`
- Ends the current session and invalidates the NexlaSessionToken.
- `obtain_session_token(self) -> None`
- Source: `nexla_sdk/auth.py:83`
- Source: `nexla_sdk/auth.py:88`
- Obtains a session token using the service key
- `refresh_session_token(self) -> None`
- Source: `nexla_sdk/auth.py:134`
- Source: `nexla_sdk/auth.py:143`
- Refresh token (compat shim).

21 changes: 12 additions & 9 deletions docs-site/docs/api/python/modules/nexla_sdk.client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Nexla API client

### NexlaClient

Defined in `nexla_sdk/client.py:44`
Defined in `nexla_sdk/client.py:52`

Client for the Nexla API

Expand All @@ -22,20 +22,20 @@ The Nexla API supports two authentication methods:
Service keys are long-lived credentials created in the Nexla UI. The SDK
obtains session tokens using the service key on demand and re-obtains a new
token as needed. No refresh endpoint is used.

2. **Direct Access Token Authentication**:
Use a pre-obtained access token directly. These tokens are not refreshed by the SDK.

Examples:
# Method 1: Using service key (recommended for automation)
client = NexlaClient(service_key="your-service-key")

# Method 2: Using access token directly (manual/short-term use)
client = NexlaClient(access_token="your-access-token")

# Using the client (same regardless of authentication method)
flows = client.flows.list()

Note:
- Service keys should be treated as highly sensitive credentials
- Only provide either service_key OR access_token, not both
Expand All @@ -44,16 +44,19 @@ Note:

Methods:

- `create_webhook_client(self, api_key: str) -> nexla_sdk.resources.webhooks.WebhooksResource`
- Source: `nexla_sdk/client.py:243`
- Create a webhook client for sending data to Nexla webhooks.
- `get_access_token(self) -> str`
- Source: `nexla_sdk/client.py:179`
- Source: `nexla_sdk/client.py:193`
- Get a valid access token.
- `logout(self) -> None`
- Source: `nexla_sdk/client.py:221`
- Source: `nexla_sdk/client.py:235`
- Logout current session and invalidate token.
- `refresh_access_token(self) -> str`
- Source: `nexla_sdk/client.py:201`
- Source: `nexla_sdk/client.py:215`
- Obtain a fresh token and return it.
- `request(self, method: str, path: str, **kwargs) -> Optional[Dict[str, Any]]`
- Source: `nexla_sdk/client.py:260`
- Source: `nexla_sdk/client.py:316`
- Send a request to the Nexla API

42 changes: 21 additions & 21 deletions docs-site/docs/api/python/modules/nexla_sdk.exceptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,50 +10,50 @@ keywords: [Nexla, SDK, Python, API]

### AuthenticationError

Defined in `nexla_sdk/exceptions.py:70`
Defined in `nexla_sdk/exceptions.py:72`

Raised when authentication fails.

Methods:

- `get_error_summary(self) -> Dict[str, Any]`
- Source: `nexla_sdk/exceptions.py:54`
- Source: `nexla_sdk/exceptions.py:56`
- Get structured error information.

### AuthorizationError

Defined in `nexla_sdk/exceptions.py:80`
Defined in `nexla_sdk/exceptions.py:82`

Raised when user lacks permission.

Methods:

- `get_error_summary(self) -> Dict[str, Any]`
- Source: `nexla_sdk/exceptions.py:54`
- Source: `nexla_sdk/exceptions.py:56`
- Get structured error information.

### CredentialError

Defined in `nexla_sdk/exceptions.py:113`
Defined in `nexla_sdk/exceptions.py:120`

Raised when credential validation fails.

Methods:

- `get_error_summary(self) -> Dict[str, Any]`
- Source: `nexla_sdk/exceptions.py:54`
- Source: `nexla_sdk/exceptions.py:56`
- Get structured error information.

### FlowError

Defined in `nexla_sdk/exceptions.py:125`
Defined in `nexla_sdk/exceptions.py:132`

Raised when flow operations fail.

Methods:

- `get_error_summary(self) -> Dict[str, Any]`
- Source: `nexla_sdk/exceptions.py:54`
- Source: `nexla_sdk/exceptions.py:56`
- Get structured error information.

### NexlaError
Expand All @@ -65,78 +65,78 @@ Base exception for all Nexla errors.
Methods:

- `get_error_summary(self) -> Dict[str, Any]`
- Source: `nexla_sdk/exceptions.py:54`
- Source: `nexla_sdk/exceptions.py:56`
- Get structured error information.

### NotFoundError

Defined in `nexla_sdk/exceptions.py:85`
Defined in `nexla_sdk/exceptions.py:88`

Raised when a resource is not found.

Methods:

- `get_error_summary(self) -> Dict[str, Any]`
- Source: `nexla_sdk/exceptions.py:54`
- Source: `nexla_sdk/exceptions.py:56`
- Get structured error information.

### RateLimitError

Defined in `nexla_sdk/exceptions.py:95`
Defined in `nexla_sdk/exceptions.py:100`

Raised when rate limit is exceeded.

Methods:

- `get_error_summary(self) -> Dict[str, Any]`
- Source: `nexla_sdk/exceptions.py:54`
- Source: `nexla_sdk/exceptions.py:56`
- Get structured error information.

### ResourceConflictError

Defined in `nexla_sdk/exceptions.py:108`
Defined in `nexla_sdk/exceptions.py:114`

Raised when resource conflicts occur.

Methods:

- `get_error_summary(self) -> Dict[str, Any]`
- Source: `nexla_sdk/exceptions.py:54`
- Source: `nexla_sdk/exceptions.py:56`
- Get structured error information.

### ServerError

Defined in `nexla_sdk/exceptions.py:103`
Defined in `nexla_sdk/exceptions.py:108`

Raised when server returns 5xx error.

Methods:

- `get_error_summary(self) -> Dict[str, Any]`
- Source: `nexla_sdk/exceptions.py:54`
- Source: `nexla_sdk/exceptions.py:56`
- Get structured error information.

### TransformError

Defined in `nexla_sdk/exceptions.py:139`
Defined in `nexla_sdk/exceptions.py:152`

Raised when transform operations fail.

Methods:

- `get_error_summary(self) -> Dict[str, Any]`
- Source: `nexla_sdk/exceptions.py:54`
- Source: `nexla_sdk/exceptions.py:56`
- Get structured error information.

### ValidationError

Defined in `nexla_sdk/exceptions.py:90`
Defined in `nexla_sdk/exceptions.py:94`

Raised when request validation fails.

Methods:

- `get_error_summary(self) -> Dict[str, Any]`
- Source: `nexla_sdk/exceptions.py:54`
- Source: `nexla_sdk/exceptions.py:56`
- Get structured error information.

16 changes: 5 additions & 11 deletions docs-site/docs/api/python/modules/nexla_sdk.http_client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,32 @@ HTTP client interface and implementations for Nexla SDK

### HttpClientError

Defined in `nexla_sdk/http_client.py:60`
Defined in `nexla_sdk/http_client.py:66`

Base exception for HTTP client errors

### HttpClientInterface

Defined in `nexla_sdk/http_client.py:34`
Defined in `nexla_sdk/http_client.py:38`

Abstract interface for HTTP clients used by the Nexla SDK.
This allows for different HTTP client implementations or mocks for testing.

Methods:

- `request(self, method: str, url: str, headers: Dict[str, str], **kwargs) -> Optional[Dict[str, Any]]`
- Source: `nexla_sdk/http_client.py:40`
- Source: `nexla_sdk/http_client.py:44`
- Send an HTTP request

### RequestsHttpClient

Defined in `nexla_sdk/http_client.py:69`
Defined in `nexla_sdk/http_client.py:82`

HTTP client implementation using the requests library with retries and timeouts.

Methods:

- `request(self, method: str, url: str, headers: Dict[str, str], **kwargs) -> Optional[Dict[str, Any]]`
- Source: `nexla_sdk/http_client.py:98`
- Source: `nexla_sdk/http_client.py:119`
- Send an HTTP request using a session with sane defaults.

## Functions

### `inject(carrier: Dict[str, str]) -> None`

Source: `nexla_sdk/http_client.py:30`

Loading
Loading