# Stats

**URL:** https://heroiclabs.com/docs/hiro/python/stats/
**Summary:** Manage and update player statistics, both public and private.
**Keywords:** stats, hiro
**Categories:** hiro, python, stats

---


# Stats

*The Stats system tracks and updates both public and private player statistics.* Learn more in the [Stats concept guide](../../concepts/stats/_index.md).

## Overview

The Stats system allows your game to:

* Retrieve current player statistics.
* Update both public and private player statistics.

## Before You Start

Make sure you have:

* Python project configured with Hiro SDK.
* Nakama system integrated ([guide](../getting-started/_index.md)).

## Working with Stats

### Retrieving Stats

Retrieve all current stats for the player:

```py
stat_list = await hiro_client.stats_get()
print(stat_list)
```

### Updating Stats

Update public and private stats for the player:

```py
request = StatUpdateRequest()
request.public = [
    {
        "name": "public_stat_1",
        "value": 100,
        "operator": StatUpdateOperator.SET
    }
]
request.private = [
    {
        "name": "private_stat_1",
        "value": 100,
        "operator": StatUpdateOperator.SET
    }
]

stat_list = await hiro_client.stats_update(request)
print(stat_list)
```

## Next Steps
- [Level-Based Stats](../../guides/personalizer/level-based-stats/)