> For the complete documentation index, see [llms.txt](https://nso-docs.cisco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nso-docs.cisco.com/guides/nso-6.5/developer-reference/pyapi/ncs.util.md).

# ncs.util Module

Utility module, low level abstrations

## Functions

### get\_callpoint\_model

```python
get_callpoint_model()
```

Get configured callpoint model

### get\_self\_assign\_warning

```python
get_self_assign_warning()
```

Return current self assign warning type.

### get\_setattr\_fun

```python
get_setattr_fun(obj, parent)
```

Return setattr fun to use for setting attributes, will use return a wrapped setattr function with sanity checks if enabled.

### is\_multiprocessing

```python
is_multiprocessing()
```

Return True if the configured callpoint model is multiprocessing

### mk\_yang\_date\_and\_time

```python
mk_yang_date_and_time(dt=None)
```

Create a timezone aware datetime object in ISO8601 string format.

This method is used to convert a datetime object to its timezone aware counterpart and return a string useful for a 'yang:date-and-time' leaf. If 'dt' is None the current time will be used.

Arguments: dt -- a datetime object to be converted (optional)

### set\_callpoint\_model

```python
set_callpoint_model(model)
```

Update environment with provided callpoint model

### set\_kill\_child\_on\_parent\_exit

```python
set_kill_child_on_parent_exit()
```

Multi OS variant of \_ncs.set\_kill\_child\_on\_parent\_exit falling back to kqueue if the OS supports it.

### set\_self\_assign\_warning

```python
set_self_assign_warning(warning)
```

Set self assign warning type.

### with\_setattr\_check

```python
with_setattr_check(path)
```

Use as context manager enabling set attribute check for the current thread while in the manager.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://nso-docs.cisco.com/guides/nso-6.5/developer-reference/pyapi/ncs.util.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
