An open API service indexing awesome lists of open source software.

https://github.com/spenserblack/nested-attrs

Just some small helpers for nested attributes
https://github.com/spenserblack/nested-attrs

delattr getattr hasattr nested python python3 setattr

Last synced: 11 months ago
JSON representation

Just some small helpers for nested attributes

Awesome Lists containing this project

README

          

# nested-attrs

[![PyPI](https://img.shields.io/pypi/v/nested-attrs)](https://pypi.org/project/nested-attrs/)
[![CI](https://github.com/spenserblack/nested-attrs/actions/workflows/ci.yml/badge.svg)](https://github.com/spenserblack/nested-attrs/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/spenserblack/nested-attrs/branch/main/graph/badge.svg?token=XT5zP9lhqm)](https://codecov.io/gh/spenserblack/nested-attrs)

Just some small helpers for nested attributes.

## Example

```python
from nested_attrs import ngetattr as getattr
from nested_attrs import nsetattr as setattr

setattr(x, 'y.z', 'Hello, World!')
getattr(x, 'y.z') # 'Hello, World!
```