Skip to content

Commit 4cb418b

Browse files
author
Joel Collins
committed
Updated action builder example
1 parent af56b80 commit 4cb418b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/basic_usage/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ An example Lab Thing built from our ``PretendSpectrometer`` class, complete with
5151
5252
# Averaged measurement action
5353
labthing.build_action(
54-
my_spectrometer.average_data, # Python function
54+
my_spectrometer, # Python object
55+
"average_data", # Objects method name
5556
description="Take an averaged measurement",
5657
args={ # How do we convert from the request input to function arguments?
5758
"n": fields.Int(description="Number of averages to take", example=5, default=5)

0 commit comments

Comments
 (0)