> For the complete documentation index, see [llms.txt](https://trillo.gitbook.io/trillo-workbench-python-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trillo.gitbook.io/trillo-workbench-python-sdk/database/sample-functions-using-api.md).

# Sample Functions Using API

### Function - AddCustomerRecord.py

```python
from src.collager.util import DSApi


 def _handle(parameter):
    className = "shared.common.customer"
    entity = {
        "name": "Sam",
        "email": "sam@gmail.com",
        "address": "45, park view, NY",
        "phoneNumber": "+16463704660"
    }
    res = DSApi.save(className, entity)
    return res

```

### Function - UpdateCustomerAddress.py

```java
from src.collager.util import DSApi


def _handle(parameter):
    className = "shared.common.customer"
    id = "1"
    attrName = "address"
    value = "7, woodland street, NY"
    res = DSApi.update(className, id, attrName, value)
    return res

```
