# load\_attrs

Loads data from a dict into the [MaciDataObj](/docs/maci/object.md) 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](/docs/maci/object.md) 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.macilib.org/docs/maci/object/methods/load_attrs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
