Trillo Workbench Python SDK
  • Introduction
    • Sample Example
  • BaseApi (Basic APIs)
  • LogApi (Logging APIs)
  • DSApi (Database APIs)
    • Overview
    • Retrieve APIs
    • Create and Update API
    • Delete APIs
    • Empty Table
    • Sample Functions Using API
  • FuncApi (Function APIs)
  • TaskApi (Task APIs)
  • CacheApi (Memory Cache APIs)
    • Delete APIs
    • Create and Update API
    • Retrieve APIs
  • StorageApi
  • CallLogger (Logging Level APIs)
  • CommandApi
  • OAuth1Api
  • Google Cloud APIs
    • BigQueryApi (BigQuery APIs)
    • GCSApi (Cloud Storage APIs)
    • GCPAuthApi
    • GCPRestApi
    • GCPTokenInfo
  • Metadata API (MetaApi)
    • Create and Update API
    • All Retrieve-Only
  • UMApi (User, Tenant, Roles APIs)
  • HttpApi (HTTP APIs)
  • SFTPApi
  • FileUtil
  • CSVApi
  • EmailApi (Email APIs)
  • DLPApi
  • DocApi
  • FolderApi
  • GCPGenApi
  • Util
Powered by GitBook
On this page
  • Function - AddCustomerRecord.py
  • Function - UpdateCustomerAddress.py
  1. DSApi (Database APIs)

Sample Functions Using API

Function - AddCustomerRecord.py

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

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
PreviousEmpty TableNextFuncApi (Function APIs)

Last updated 1 year ago