# Chalk Python SDK Reference: Integrations
source: https://docs.chalk.ai/api-docs#section-integrations

## `APINamespace`
source: https://docs.chalk.ai/api-docs#APINamespace

Class

Namespace for Chalk management APIs accessible via `client.api`.

**Attributes**

- `datasources`: `DatasourceAPI`

## `DatasourceAPI`
source: https://docs.chalk.ai/api-docs#DatasourceAPI

Class

### `DatasourceAPI.list()`
source: https://docs.chalk.ai/api-docs#DatasourceAPI.list

List all data sources in the current environment.

### `DatasourceAPI.get(id)`
source: https://docs.chalk.ai/api-docs#DatasourceAPI.get

Get a data source by ID.

**Parameters**

- `id`: `str`
  The integration ID.

### `DatasourceAPI.create(kind, name, config)`
source: https://docs.chalk.ai/api-docs#DatasourceAPI.create

Create a new data source.

**Parameters**

- `kind`: `str | IntegrationKind`
  The type of data source. Can be an [`IntegrationKind`](https://docs.chalk.ai/api-docs#IntegrationKind) enum or a string (e.g. `"snowflake"`, `"postgresql"`, `"bigquery"`, `"kafka"`).
- `name`: `str`
  A name for this data source integration. Must only contain letters, numbers, and underscores.
- `config`: `dict[str, ConfigValue]`
  A dictionary of configuration values. Each value can be either a literal string or a [`LinkedSecretRef`](https://docs.chalk.ai/api-docs#LinkedSecretRef) pointing at an existing secret in the environment's secret store. For example, for BigQuery: `{"BQ_PROJECT": "my-project", "BQ_DATASET": "my_dataset", "BQ_CREDENTIALS_BASE64": LinkedSecretRef("bq-sa-key")}`.

### `DatasourceAPI.update(id, config, name)`
source: https://docs.chalk.ai/api-docs#DatasourceAPI.update

Update an existing data source.

**Parameters**

- `id`: `str`
  The integration ID to update.
- `config`: `dict[str, ConfigValue] | None` = `None`
  Updated configuration values. Only provided keys are updated. Values may be literal strings or [`LinkedSecretRef`](https://docs.chalk.ai/api-docs#LinkedSecretRef) references to existing secrets.
- `name`: `str | None` = `None`
  Optionally update the integration name.

### `DatasourceAPI.delete(id)`
source: https://docs.chalk.ai/api-docs#DatasourceAPI.delete

Delete a data source.

**Parameters**

- `id`: `str`
  The integration ID to delete.

### `DatasourceAPI.test(id)`
source: https://docs.chalk.ai/api-docs#DatasourceAPI.test

Test connectivity of an existing data source.

**Parameters**

- `id`: `str`
  The integration ID to test.

## `Datasource`
source: https://docs.chalk.ai/api-docs#Datasource

Class

**Attributes**

- `id`: `str`
- `name`: `str`
- `kind`: `IntegrationKind`
- `environment_id`: `str`
- `created_at`: `datetime`
- `updated_at`: `datetime`

### `Datasource.from_proto(proto)`
source: https://docs.chalk.ai/api-docs#Datasource.from_proto

## `DatasourceTestResult`
source: https://docs.chalk.ai/api-docs#DatasourceTestResult

Class

**Attributes**

- `success`: `bool`
- `message`: `str`
- `latency_seconds`: `float`

## `IntegrationKind`
source: https://docs.chalk.ai/api-docs#IntegrationKind

Enum (bases: `str`, `Enum`)
