Skip to content

Instrument

An Instrument is a reference to an instrument attached to your session, uniquely identified by its serial number (GUID). Instrument gives read access to an instrument's metadata, status, and configuration.

To start a measurement or configure parameters, you must first claim an instrument. An active InstrumentClaim locks the instrument to your session. All control operations (start_measurement, set_potential, configure, pause / resume / abort, ...) are only accessible on a claimed instrument.

You can use the claim as a context manager. The instrument is released when the block exits, even if it raises an exception:

async with await instrument.claim() as claim:
    await claim.set_current_range('1 mA')
    job = await claim.start_measurement(method=method)
    measurement = await job  # claim released here

To claim several instruments at once, use Session.claim. This returns InstrumentClaimBatch that releases every claim when its block exits.

Classes:

pypalmsens.lablink.Instrument

Instrument(serial: str, session: Session)

A reference to an instrument.

Methods:

Attributes:

Source code in src/pypalmsens/lablink/_instrument.py
161
162
163
def __init__(self, serial: str, session: Session):
    self._serial: str = serial
    self._session: Session = session

info property

info: dict[str, Any]

The instrument info from the most recent get_info call.

May be stale or empty.

serial_number property

serial_number: str

The serial number of the instrument.

claim async

claim(*, auto_release: bool = False) -> InstrumentClaim

Claim this instrument.

The claim is held until you release it, or until the enclosing async with block exits.

Parameters:

  • auto_release

    (bool, default: False ) –

    If True, the server releases the claim after measurement ends.

Returns:

Source code in src/pypalmsens/lablink/_instrument.py
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
async def claim(self, *, auto_release: bool = False) -> InstrumentClaim:
    """Claim this instrument.

    The claim is held until you release it, or until the enclosing
    `async with` block exits.

    Parameters
    ----------
    auto_release: bool, optional
        If True, the server releases the claim after measurement ends.

    Returns
    -------
    claim : InstrumentClaim
        Claimed instrument
    """
    method = 'Claim' if auto_release else 'ManualClaim'
    await self._session._http.post(f'/Instrument/{self._serial}/{method}')
    return InstrumentClaim(self._serial, self._session)

get_active_measurement async

get_active_measurement() -> Measurement

Return the active measurement, if any.

Returns:

  • measurement ( Measurement ) –

    Reference to the active measurement

Raises:

Source code in src/pypalmsens/lablink/_instrument.py
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
async def get_active_measurement(self) -> Measurement:
    """Return the active measurement, if any.

    Returns
    -------
    measurement : Measurement
        Reference to the active measurement

    Raises
    ------
    NoActiveMeasurementError
        If there is no active measurement.
    """
    response = await self._session._http.get(
        f'/Instrument/{self._serial}/CurrentMeasurement'
    )
    data = response.json()
    guid = data['result']['id']
    return Measurement(guid=guid, session=self._session)

get_capabilities async

get_capabilities() -> dict[str, Any]

Fetch the capabilities of this instrument.

Returns:

  • dict[str, Any] –

    Dictionary with supported features.

Source code in src/pypalmsens/lablink/_instrument.py
109
110
111
112
113
114
115
116
117
118
119
async def get_capabilities(self) -> dict[str, Any]:
    """Fetch the capabilities of this instrument.

    Returns
    -------
    dict[str, Any]
        Dictionary with supported features.
    """
    response = await self._session._http.get(f'/Instrument/{self._serial}/Capabilities')
    data = response.json()
    return data['result']

get_configuration async

get_configuration() -> dict[str, Any]

Get the current configuration for this instrument.

Returns:

  • dict[str, Any] –

    Dictionary with current configuration.

Source code in src/pypalmsens/lablink/_instrument.py
 97
 98
 99
100
101
102
103
104
105
106
107
async def get_configuration(self) -> dict[str, Any]:
    """Get the current configuration for this instrument.

    Returns
    -------
    dict[str, Any]
        Dictionary with current configuration.
    """
    response = await self._session._http.get(f'/Instrument/{self._serial}/Configuration')
    data = response.json()
    return data['result']

get_info async

get_info() -> dict[str, Any]

Get info for instrument.

Returns:

  • info ( dict[str, Any] ) –

    Dictionary with instrument info.

Source code in src/pypalmsens/lablink/_instrument.py
74
75
76
77
78
79
80
81
82
83
async def get_info(self) -> dict[str, Any]:
    """Get info for instrument.

    Returns
    -------
    info : dict[str, Any]
        Dictionary with instrument info.
    """
    info = await self._session.get_instrument_info()
    return info[self._serial]

get_signalr_url async

get_signalr_url() -> str

Return the signal rate URL for this instrument.

Returns:

  • url ( str ) –

    Generated signalr url for this instrument.

Source code in src/pypalmsens/lablink/_instrument.py
85
86
87
88
89
90
91
92
93
94
95
async def get_signalr_url(self) -> str:
    """Return the signal rate URL for this instrument.

    Returns
    -------
    url : str
        Generated signalr url for this instrument.
    """
    response = await self._session._http.get(f'/Instrument/{self._serial}/GetSignalRUrl')
    data = response.json()
    return data['result']

get_state async

get_state() -> dict[str, Any]

Fetch the current state of this instrument.

Returns:

  • dict[str, Any] –

    dictionary describing the current device state.

Source code in src/pypalmsens/lablink/_instrument.py
141
142
143
144
145
146
147
148
149
150
151
async def get_state(self) -> dict[str, Any]:
    """Fetch the current state of this instrument.

    Returns
    -------
    dict[str, Any]
        dictionary describing the current device state.
    """
    response = await self._session._http.get(f'/Instrument/{self._serial}/State')
    data = response.json()
    return data['result']

pypalmsens.lablink.InstrumentClaim

InstrumentClaim(serial: str, session: Session)

A reference to a claimed instrument.

Can also be used as a context manager for a claiming an instrument.

Methods:

Attributes:

Source code in src/pypalmsens/lablink/_instrument.py
209
210
211
def __init__(self, serial: str, session: Session):
    self._serial: str = serial
    self._session: Session = session

info property

info: dict[str, Any]

The instrument info from the most recent get_info call.

May be stale or empty.

serial_number property

serial_number: str

The serial number of the claimed instrument.

abort_measurement async

abort_measurement() -> None

Stop and release a running measurement.

The instrument resets to the pre-measurement state after aborting.

Source code in src/pypalmsens/lablink/_instrument.py
303
304
305
306
307
308
async def abort_measurement(self) -> None:
    """Stop and release a running measurement.

    The instrument resets to the pre-measurement state after aborting.
    """
    await self._session._http.post(f'/Instrument/{self._serial}/AbortMeasurement')

configure async

configure(mains_frequency: Literal['auto', 50, 60] | None = None, signal_train: Literal['lowspeed', 'highspeed', 'maximumrange'] | None = None, multichannel_role: Literal['standalone', 'main', 'follower'] | None = None) -> None

Configure this instrument.

Parameters:

  • mains_frequency

    (int or None, default: None ) –

    Set the DC mains frequency in to 50 or 60 Hz, depending on your region. Use 'auto' for automatic determination of the mains frequency.

    The mains frequency of the power grid couples into the measured current. The instrument filters sampling at that frequency.

  • signal_train

    (str or None, default: None ) –

    Speed of the analog input train (e.g. 'lowSpeed', 'highSpeed').

  • multichannel_role

    (str or None, default: None ) –

    Role for multi-channel mode ('standalone', 'main', 'follower').

Source code in src/pypalmsens/lablink/_instrument.py
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
async def configure(
    self,
    mains_frequency: Literal['auto', 50, 60] | None = None,
    signal_train: Literal['lowspeed', 'highspeed', 'maximumrange'] | None = None,
    multichannel_role: Literal['standalone', 'main', 'follower'] | None = None,
) -> None:
    """Configure this instrument.

    Parameters
    ----------
    mains_frequency : int or None, optional
        Set the DC mains frequency in to 50 or 60 Hz, depending on your region.
        Use 'auto' for automatic determination of the mains frequency.

        The mains frequency of the power grid couples into the measured current.
        The instrument filters sampling at that frequency.
    signal_train : str or None, optional
        Speed of the analog input train (e.g. 'lowSpeed', 'highSpeed').
    multichannel_role : str or None, optional
        Role for multi-channel mode ('standalone', 'main', 'follower').
    """
    if mains_frequency == 50:
        _mains_freq = 'Hz50'
    elif mains_frequency == 60:
        _mains_freq = 'Hz60'
    elif mains_frequency == 'auto':
        _mains_freq = 'Undefined'
    else:
        _mains_freq = None

    if multichannel_role == 'main':
        _role = 'Master'
    elif multichannel_role == 'follower':
        _role = 'Slave'
    elif multichannel_role == 'standalone':
        _role = 'Standalone'
    else:
        _role = None

    if signal_train:
        _signal_train = signal_train.capitalize()
    else:
        _signal_train = None

    config = ConfigureInstrumentsProperties.model_validate(
        {
            'MainsFrequency': _mains_freq,
            'SignalTrain': signal_train,
            'MultiChannelRole': _role,
        }
    )
    # TODO: How does the endpoint handle null?
    # If the endpoint treats this as a patch,
    # nulls may clear settings or be rejected
    payload = config.model_dump(exclude_none=True)

    await self._session._http.post(
        f'/Instrument/{self._serial}/ConfigureInstrument', json=payload
    )

get_active_measurement async

get_active_measurement() -> Measurement

Return the active measurement, if any.

Returns:

  • measurement ( Measurement ) –

    Reference to the active measurement

Raises:

Source code in src/pypalmsens/lablink/_instrument.py
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
async def get_active_measurement(self) -> Measurement:
    """Return the active measurement, if any.

    Returns
    -------
    measurement : Measurement
        Reference to the active measurement

    Raises
    ------
    NoActiveMeasurementError
        If there is no active measurement.
    """
    response = await self._session._http.get(
        f'/Instrument/{self._serial}/CurrentMeasurement'
    )
    data = response.json()
    guid = data['result']['id']
    return Measurement(guid=guid, session=self._session)

get_capabilities async

get_capabilities() -> dict[str, Any]

Fetch the capabilities of this instrument.

Returns:

  • dict[str, Any] –

    Dictionary with supported features.

Source code in src/pypalmsens/lablink/_instrument.py
109
110
111
112
113
114
115
116
117
118
119
async def get_capabilities(self) -> dict[str, Any]:
    """Fetch the capabilities of this instrument.

    Returns
    -------
    dict[str, Any]
        Dictionary with supported features.
    """
    response = await self._session._http.get(f'/Instrument/{self._serial}/Capabilities')
    data = response.json()
    return data['result']

get_configuration async

get_configuration() -> dict[str, Any]

Get the current configuration for this instrument.

Returns:

  • dict[str, Any] –

    Dictionary with current configuration.

Source code in src/pypalmsens/lablink/_instrument.py
 97
 98
 99
100
101
102
103
104
105
106
107
async def get_configuration(self) -> dict[str, Any]:
    """Get the current configuration for this instrument.

    Returns
    -------
    dict[str, Any]
        Dictionary with current configuration.
    """
    response = await self._session._http.get(f'/Instrument/{self._serial}/Configuration')
    data = response.json()
    return data['result']

get_info async

get_info() -> dict[str, Any]

Get info for instrument.

Returns:

  • info ( dict[str, Any] ) –

    Dictionary with instrument info.

Source code in src/pypalmsens/lablink/_instrument.py
74
75
76
77
78
79
80
81
82
83
async def get_info(self) -> dict[str, Any]:
    """Get info for instrument.

    Returns
    -------
    info : dict[str, Any]
        Dictionary with instrument info.
    """
    info = await self._session.get_instrument_info()
    return info[self._serial]

get_signalr_url async

get_signalr_url() -> str

Return the signal rate URL for this instrument.

Returns:

  • url ( str ) –

    Generated signalr url for this instrument.

Source code in src/pypalmsens/lablink/_instrument.py
85
86
87
88
89
90
91
92
93
94
95
async def get_signalr_url(self) -> str:
    """Return the signal rate URL for this instrument.

    Returns
    -------
    url : str
        Generated signalr url for this instrument.
    """
    response = await self._session._http.get(f'/Instrument/{self._serial}/GetSignalRUrl')
    data = response.json()
    return data['result']

get_state async

get_state() -> dict[str, Any]

Fetch the current state of this instrument.

Returns:

  • dict[str, Any] –

    dictionary describing the current device state.

Source code in src/pypalmsens/lablink/_instrument.py
141
142
143
144
145
146
147
148
149
150
151
async def get_state(self) -> dict[str, Any]:
    """Fetch the current state of this instrument.

    Returns
    -------
    dict[str, Any]
        dictionary describing the current device state.
    """
    response = await self._session._http.get(f'/Instrument/{self._serial}/State')
    data = response.json()
    return data['result']

pause_measurement async

pause_measurement() -> None

Pause a running measurement.

The instrument holds its current state and resumes later.

Source code in src/pypalmsens/lablink/_instrument.py
292
293
294
295
296
297
async def pause_measurement(self) -> None:
    """Pause a running measurement.

    The instrument holds its current state and resumes later.
    """
    await self._session._http.post(f'/Instrument/{self._serial}/PauseMeasurement')

release async

release() -> None

Release the instrument claim.

Source code in src/pypalmsens/lablink/_instrument.py
233
234
235
async def release(self) -> None:
    """Release the instrument claim."""
    await self._session._http.post(f'/Instrument/{self._serial}/Unclaim')

resume_measurement async

resume_measurement() -> None

Resume a previously paused measurement.

Source code in src/pypalmsens/lablink/_instrument.py
299
300
301
async def resume_measurement(self) -> None:
    """Resume a previously paused measurement."""
    await self._session._http.post(f'/Instrument/{self._serial}/ResumeMeasurement')

set_bipot_current_range async

set_bipot_current_range(current_range: AllowedCurrentRanges) -> None

Set the current range of the second working electrode (bipot, WE2).

Parameters:

Source code in src/pypalmsens/lablink/_instrument.py
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
async def set_bipot_current_range(self, current_range: AllowedCurrentRanges) -> None:
    """Set the current range of the second working electrode (bipot, WE2).

    Parameters
    ----------
    current_range : AllowedCurrentRanges
        Desired WE2 current range as a string (e.g. '1 mA').
    """
    # TODO: investigate intention behind MeasuringRange
    sig, exp = cr_string_to_sig_exp(current_range)
    config = MeasuringRange(Significant=sig, Exponent=exp)
    payload = config.model_dump()

    await self._session._http.post(
        f'/Instrument/{self._serial}/SetBiPotCurrentRange',
        json=payload,
    )

set_bipot_enabled async

set_bipot_enabled(state: bool) -> None

Enable or disable the second working electrode (bipot, WE2).

Parameters:

  • state

    (bool) –

    True = bipotentiostat on (WE2 active), False = off.

Source code in src/pypalmsens/lablink/_instrument.py
450
451
452
453
454
455
456
457
458
async def set_bipot_enabled(self, state: bool) -> None:
    """Enable or disable the second working electrode (bipot, WE2).

    Parameters
    ----------
    state : bool
        True = bipotentiostat on (WE2 active), False = off.
    """
    await self._session._http.post(f'/Instrument/{self._serial}/SetBiPotState', json=state)

set_bipot_mode async

set_bipot_mode(mode: Literal['constant', 'offset']) -> None

Set how the second working electrode (WE2) is coupled to WE1.

  • constant: WE2 is held at a fixed potential vs. the RE while WE1 is stepped or swept independently.
  • offset: WE2 tracks WE1, maintained at a fixed potential difference from WE1 as WE1 changes.

Parameters:

  • mode

    (str) –

    Coupling mode: 'constant' or 'offset'.

Source code in src/pypalmsens/lablink/_instrument.py
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
async def set_bipot_mode(self, mode: Literal['constant', 'offset']) -> None:
    """Set how the second working electrode (WE2) is coupled to WE1.

    - `constant`: WE2 is held at a fixed potential vs. the RE while
      WE1 is stepped or swept independently.
    - `offset`: WE2 tracks WE1, maintained at a fixed potential
      difference from WE1 as WE1 changes.

    Parameters
    ----------
    mode : str
        Coupling mode: 'constant' or 'offset'.
    """
    payload = CellMode[mode.capitalize()].value

    await self._session._http.post(f'/Instrument/{self._serial}/SetBiPotMode', json=payload)

set_bipot_potential async

set_bipot_potential(potential: float) -> None

Set the potential of the second working electrode (WE2).

Parameters:

  • potential

    (float) –

    WE2 setpoint in volts. Absolute vs. RE in constant mode, or the WE1-relative offset in offset mode.

Source code in src/pypalmsens/lablink/_instrument.py
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
async def set_bipot_potential(self, potential: float) -> None:
    """Set the potential of the second working electrode (WE2).

    Parameters
    ----------
    potential : float
        WE2 setpoint in volts. Absolute vs. RE in constant mode, or the
        WE1-relative offset in offset mode.
    """
    config = Volt(Value=potential)
    payload = config.model_dump()

    await self._session._http.post(
        f'/Instrument/{self._serial}/SetBiPotPotential',
        json=payload,
    )

set_cell_mode async

set_cell_mode(mode: Literal['potentiostatic', 'galvanostatic']) -> None

Set active measurement mode of the instrument.

Parameters:

  • mode

    (str) –

    One of 'potentiostatic' or 'galvanostatic'.

Source code in src/pypalmsens/lablink/_instrument.py
237
238
239
240
241
242
243
244
245
246
async def set_cell_mode(self, mode: Literal['potentiostatic', 'galvanostatic']) -> None:
    """Set active measurement mode of the instrument.

    Parameters
    ----------
    mode : str
        One of 'potentiostatic' or 'galvanostatic'.
    """
    payload = CellMode[mode.capitalize()].value
    await self._session._http.post(f'/Instrument/{self._serial}/SetCellMode', json=payload)

set_cell_state async

set_cell_state(state: Literal['off', 'on']) -> None

Sets the cell state.

Parameters:

  • state

    (str) –

    Set the cell 'on' or 'off'

Source code in src/pypalmsens/lablink/_instrument.py
248
249
250
251
252
253
254
255
256
257
async def set_cell_state(self, state: Literal['off', 'on']) -> None:
    """Sets the cell state.

    Parameters
    ----------
    state : str
        Set the cell 'on' or 'off'
    """
    payload = CellState[state.capitalize()].value
    await self._session._http.post(f'/Instrument/{self._serial}/SetCellState', json=payload)

set_current async

set_current(current: float) -> None

Set the cell current (galvanostatic mode).

Parameters:

  • current

    (float) –

    Current value in µA.

Source code in src/pypalmsens/lablink/_instrument.py
423
424
425
426
427
428
429
430
431
432
433
434
async def set_current(self, current: float) -> None:
    """Set the cell current (galvanostatic mode).

    Parameters
    ----------
    current : float
        Current value in µA.
    """
    await self._session._http.post(
        f'/Instrument/{self._serial}/SetCurrent',
        json=current,
    )

set_current_range async

set_current_range(current_range: AllowedCurrentRanges) -> None

Set the current measurement range.

Parameters:

Source code in src/pypalmsens/lablink/_instrument.py
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
async def set_current_range(self, current_range: AllowedCurrentRanges) -> None:
    """Set the current measurement range.

    Parameters
    ----------
    current_range : AllowedCurrentRanges
        The desired range as a string (e.g. '1 mA').
    """
    # TODO: investigate intention behind MeasuringRange
    sig, exp = cr_string_to_sig_exp(current_range)
    config = MeasuringRange(Significant=sig, Exponent=exp)
    payload = config.model_dump()
    await self._session._http.post(
        f'/Instrument/{self._serial}/SetCurrentRange',
        json=payload,
    )

set_custom_name async

set_custom_name(name: str) -> None

Set a custom display name for the instrument.

Parameters:

  • name

    (str) –

    Custom name to assign to the instrument

Source code in src/pypalmsens/lablink/_instrument.py
310
311
312
313
314
315
316
317
318
async def set_custom_name(self, name: str) -> None:
    """Set a custom display name for the instrument.

    Parameters
    ----------
    name : str
        Custom name to assign to the instrument
    """
    await self._session._http.post(f'/Instrument/{self._serial}/SetCustomName', json=name)

set_potential async

set_potential(potential: float) -> None

Set the working electrode (WE) potential relative to the reference electrode (RE).

Parameters:

  • potential

    (float) –

    WE potential in volts.

Source code in src/pypalmsens/lablink/_instrument.py
436
437
438
439
440
441
442
443
444
445
446
447
448
async def set_potential(self, potential: float) -> None:
    """Set the working electrode (WE) potential relative to the reference
    electrode (RE).

    Parameters
    ----------
    potential : float
        WE potential in volts.
    """
    await self._session._http.post(
        f'/Instrument/{self._serial}/SetPotential',
        json=potential,
    )

set_potential_range async

set_potential_range(potential_range: AllowedPotentialRanges) -> None

Set the potential measurement range.

Parameters:

Source code in src/pypalmsens/lablink/_instrument.py
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
async def set_potential_range(self, potential_range: AllowedPotentialRanges) -> None:
    """Set the potential measurement range.

    Parameters
    ----------
    potential_range : AllowedPotentialRanges
        The desired range as a string (e.g. '100 mV').
    """
    # TODO: investigate intention behind MeasuringRange
    sig, exp = pr_string_to_sig_exp(potential_range)
    config = MeasuringRange(Significant=sig, Exponent=exp)
    payload = config.model_dump()
    await self._session._http.post(
        f'/Instrument/{self._serial}/SetPotentialRange', json=payload
    )

skip_pre_measurement_stage async

skip_pre_measurement_stage() -> None

Skip the initial pre-measurement setup step.

Useful when you want to begin measuring without running through all calibration steps.

Source code in src/pypalmsens/lablink/_instrument.py
284
285
286
287
288
289
290
async def skip_pre_measurement_stage(self) -> None:
    """Skip the initial pre-measurement setup step.

    Useful when you want to begin measuring without running
    through all calibration steps.
    """
    await self._session._http.post(f'/Instrument/{self._serial}/SkipPreMeasurementStage')

start_measurement async

Start a measurement.

Parameters:

Returns:

Source code in src/pypalmsens/lablink/_instrument.py
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
async def start_measurement(self, method: MethodTypeCompatible) -> MeasurementJob:
    """Start a measurement.

    Parameters
    ----------
    method : MethodTypeCompatible
        The measurement technique and parameters to run.

    Returns
    -------
    job : MeasurementJob
        Reference to the measurement job
    """
    self.require_supports(method)

    payload = to_payload(method)

    response = await self._session._http.post(
        f'/Instrument/{self._serial}/StartMeasurement', json=payload
    )

    data = response.json()

    return MeasurementJob(guid=data['result'], claim=self)

start_workflow async

start_workflow(workflow: str) -> None

Start a workflow on the instrument.

Parameters:

  • workflow

    (str) –

    Name of the workfrow to execute on the instrument.

Source code in src/pypalmsens/lablink/_instrument.py
380
381
382
383
384
385
386
387
388
async def start_workflow(self, workflow: str) -> None:
    """Start a workflow on the instrument.

    Parameters
    ----------
    workflow : str
        Name of the workfrow to execute on the instrument.
    """
    await self._session._http.post(f'/Instrument/{self._serial}/SendScript', json=workflow)

pypalmsens.lablink.InstrumentClaimBatch

InstrumentClaimBatch(claims: list[InstrumentClaim])

A batch of claimed instruments.

Use as an async context manager. All claims are released when the context exits.

Parameters:

  • claims

    (list of InstrumentClaim) –

    The list of instrument claims to manage.

Methods:

  • release –

    Release all instrument claims in this batch.

Source code in src/pypalmsens/lablink/_instrument.py
526
527
def __init__(self, claims: list[InstrumentClaim]):
    self.claims: list[InstrumentClaim] = claims

release async

release() -> None

Release all instrument claims in this batch.

Source code in src/pypalmsens/lablink/_instrument.py
553
554
555
556
async def release(self) -> None:
    """Release all instrument claims in this batch."""
    tasks = [claim.release() for claim in self.claims]
    _ = await asyncio.gather(*tasks)