---
title: "ping_data_sources"
description: "ping_data_sources — test that every data source of the open project answers, without running any test."
url: "https://docs.justcat.it/reference/python-module/ping-data-sources/"
---
# ping_data_sources

## Signature

```python
cat.ping_data_sources(logging_level: LoggingLevel = None) -> list[dict]
```

## Parameters

| Parameter | Type | Default | Meaning |
|-----------|------|---------|---------|
| `logging_level` | LoggingLevel | `None` | `cat.LoggingLevel` member; used only when this is the first call of the process. See [Logging](https://docs.justcat.it/reference/python-module/introduction/#logging "Logging"). |

## What it does

Tests each data source of the open project, in the order of the project, exactly as [`ping_data_source`](https://docs.justcat.it/reference/python-module/ping-data-source/ "ping_data_source") tests one — what is proven for each provider, the 30-second statement timeout and the absence of retries are described there. The data sources are tested one after the other, so the call takes as long as the slowest ones add up to.

## Returns

A `list` with one `dict` per data source, in project order, each with the keys `name`, `provider`, `success`, `message` and `duration_seconds` — see [`ping_data_source`](https://docs.justcat.it/reference/python-module/ping-data-source/ "ping_data_source"). A project without data sources gives an empty list.

## Raises

The sign-in and plan check (first call of the process) raises the `CatPortalError` family listed on the [Introduction](https://docs.justcat.it/reference/python-module/introduction/ "Introduction") page. `System.Exception: There is no open CAT project. Open a project first.` with no open project. A data source that does not answer is **not** raised — its dict has `success` set to `False`.

## Examples

```python
cat.open_project("D:/Testing/Aero.cat.yaml")
broken = [r for r in cat.ping_data_sources() if not r["success"]]
for r in broken:
    print(r["name"], r["message"])
```

## Related

- [Introduction](https://docs.justcat.it/reference/python-module/introduction/ "Introduction") — session model, logging, .NET objects, exceptions, sign-in.
- [`ping_data_source`](https://docs.justcat.it/reference/python-module/ping-data-source/ "ping_data_source") — one data source by name.

