# load\_attrs

Loads data from a dict into the [MaciDataObj](https://docs.macilib.org/docs/maci/object) in-place. Nothing is returned.

All key and value pairs in the top level of the dictionary will be loaded creating new attribute names, with their respective values retained, in the maci object based on the key names of the dict. If the key name is not a valid [pythonic name convention](https://peps.python.org/pep-0008/), it will be skipped.

\
\&#xNAN;*Basic Example of loading attribute names from dict using default positional parameter*

```python
data.load_attrs({'attr1': 1, 'attr2': 2, 'attr3': 3})
```

In this example, we simply load attribute names and their values into the [MaciDataObj](https://docs.macilib.org/docs/maci/object) using the load\_attrs method and pass a dictionary representing the names/values we want to load in the object as an argument to the method. This is done in-place on the object.

Access the data by their individual and respective attribute names like you normally would on an object in python.

*Example accessing and viewing the data*

```python
data.attr1
data.attr2
data.attr3
print(data.attr3)
```

### parameters & arguments

Describes all parameter functionality and accepted data types

<details>

<summary>data:  dict[str, Any]</summary>

First and only required positional argument. Accepts dictionaries

Use this parameter to pass in a dictionary to load your attribute names and values into the maci object

</details>
