---
title: "get_instance"
description: "get_instance — this CAT installation: identity, versions, license key, platform. Works without sign-in."
url: "https://docs.justcat.it/reference/python-module/get-instance/"
---
# get_instance

## Signature

```python
cat.get_instance()
```

## Parameters

None.

## What it does

Loads the engine if needed, reads `%APPDATA%\CAT\.catconfig` (`~/.config/CAT/.catconfig` on Linux) and the runtime, and returns one object describing the installation. It does **not** sign in and needs neither a token nor a key — it is the one function that always works, which makes it the first thing to run when something else does not (and the way to verify an installation).

## Returns

A `CatInstanceInfoDTO` object:

| Property | Meaning |
|----------|---------|
| `InstanceID` | Identity of this installation (a GUID, created on first use). |
| `InstallationTimestamp` | When the instance was created. |
| `LicenseKey` | The stored license key (the whole key), or `None`. |
| `AutomationPlatform` | The CI/CD platform CAT detected it was started by, or `None` for an interactive start — what the interactive-only rule sees. |
| `CatTool` | `Python`. |
| `CoreVersion`, `ToolVersion` | Versions of the CAT engine and of the package. |
| `Platform`, `OsVersion` | `Windows` / `Linux` and the OS version. |
| `Expectations`, `Providers` | The expectations and providers this version knows, as one string each. |

The plan is not on this object — it is decided at sign-in, which this function does not do.

## Raises

`RuntimeError: Failed to create a .NET runtime (coreclr)…` when no .NET runtime is installed.

## Examples

```python
from justcatit import cat
i = cat.get_instance()
print(i)                       # the whole object, one line
print(i.ToolVersion, i.CoreVersion, i.Platform)
print(bool(i.LicenseKey))      # is a key stored on this machine?
```

## Related

- [Introduction](https://docs.justcat.it/reference/python-module/introduction/ "Introduction") — session model, logging, .NET objects, exceptions, sign-in.
- [`set_instance`](https://docs.justcat.it/reference/python-module/set-instance/ "set_instance") — set or remove the key.
- [Installation](https://docs.justcat.it/reference/python-module/installation/ "Installation").

