R: Get an item from a Python object

py_get_item {reticulate} | R Documentation

## Get an item from a Python object

### Description

Retrieve an item from a Python object, similar to how `x[name]` might be used in Python code to access an item indexed by `key` on an object `x`. The object's `__getitem__` method will be called.

### Usage

    py_get_item(x, key, silent = FALSE)

### Arguments

`x` | A Python object.
`key` | The key used for item lookup.
`silent` | Boolean; when `TRUE`, attempts to access missing items will return `NULL` rather than throw an error.

### See Also

Other item-related APIs: `py_del_item()`, `py_set_item()`

[Package reticulate version 1.21 Index]