# Inventor

**URL:** https://heroiclabs.com/docs/hiro/python/inventory/
**Summary:** Manage player inventories, including listing, granting, consuming, and updating items.
**Keywords:** inventor, hiro, inventory
**Categories:** hiro, python, inventory

---


# Inventory

*The Inventory system manages player-owned items, providing control over listing, granting, consuming, and updating inventory.* Learn more in the [Inventory concept guide](../../concepts/inventory/_index.md).

## Overview

Inventory enables your game to:

* List available inventory items.
* Manage player-owned items.
* Grant or consume inventory items.
* Update item properties.

## Before You Start

Ensure you have:

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

## Working with Inventory

### Listing Available Items

List all available items, optionally filtered by category:

```py
request = InventoryListRequest()
request.item_category = "weapons"

inventory_list = await hiro_client.inventory_list(request)
print(inventory_list)
```

### Listing Player's Inventory Items

List all items currently owned by the player, optionally filtered by category:

```py
request = InventoryListRequest()
request.item_category = "weapons"

player_inventory = await hiro_client.inventory_list_inventory(request)
print(player_inventory)
```

### Consuming Inventory Items

Consume (use or remove) items from a player's inventory:

```py
request = InventoryConsumeRequest()
request.items = {
    "health_potion": "1"
}

consume_rewards = await hiro_client.inventory_consume(request)
print(consume_rewards)
```

### Granting Inventory Items

Grant one or more inventory items to the player.

```py
request = InventoryGrantRequest()
request.items = {
    "bronze_sword": "1"
}

grant_rewards = await hiro_client.inventory_grant(request)
print(grant_rewards)
```

### Removing inventory items

To remove items from a user's inventory, without consuming them, use a negative grant value.

```py
request = InventoryGrantRequest()
request.items = {
    "bronze_sword": "-1"
}

grant_rewards = await hiro_client.inventory_grant(request)
print(grant_rewards)
```

### Updating Inventory Item Properties

Update properties of items already owned by a player:

```py
request = InventoryUpdateItemsRequest()
request.item_updates = {
    "bronze_sword": {
        "string_properties": {
            "example_property": "example_value"
        },
        "numeric_properties": {
            "numeric_properties": 10
        }
    }
}

update_ack = await hiro_client.inventory_update(request)
print(update_ack)
```

## Next Steps

- [Create a Collectible Cards System](../../guides/gameplay-mechanics/collectible-cards/)
- [Royal Match King's Cup using Event Leaderboards](../../guides/gameplay-mechanics/event-leaderboard/)
- [Making a Fall Guys Style In-Game Store](../../guides/gameplay-mechanics/in-game-store/)
- [Add One Time Offers to the Store](../../guides/personalizer/one-time-store-offers/)