====Capturing Data with KPICapture==== Capturing data with the KPICapture library is designed to be very simple. First, import the library... import kpicapture as kpi Next, create an instance of the **KPICapture** class. The constructor takes one parameter - the name of the [[data set|data set]] you want to record to. //There's also an optional 2nd parameter that is the path to where you'd like to record all of the captured data.// KPIs = kpi.KPICapture('daily') Next you write the KPIs you want to record with the **CaptureValue** function. Each value should be identified with a unique name... KPIs.CaptureValue("Daily Production Total",mycalculatedvalue) And finally, you write all of the changes using **Commit**, which actually writes all of the values. KPIs.Commit(day) The **Commit** function takes a Python //datetime// object. The values you've captured with the **CaptureValue** function are all recorded as happening on the //date// (not time) from that timestamp. ===See Also=== Once you've recorded these values, you might want to [[retrieving_data|read them back again]] in another report.