Skip to main content

Python API

This reference covers the public names exported by pyNetFT 2.1.0. Import them from pynetft; pynetft._native is private and is not a compatibility surface.

NeedAPI
Stream through an iterator or callbackClient
Configure connection and calibrationConfiguration and calibration
Read immutable data modelsSamples and health
Serialize stable states and unitsEnumerations
Handle structured failuresExceptions

The deprecated NetFT and Response compatibility types remain for 1.x migration during the 2.x series. New code must use Client, Sample, and Health.

Deprecated compatibility API

These types are scheduled for removal in pyNetFT 3.0. They are documented only to support an explicit migration.

pynetft.NetFT

class NetFT;

Member functions

NetFT

__init__(host: str, port: int = 49152, num_samples: int = 1, count_per_force: float | None = None, count_per_torque: float | None = None) -> None;
ParameterTypeDefault
hoststrRequired
portint49152
num_samplesint1
count_per_forcefloat | NoneNone
count_per_torquefloat | NoneNone

Returns: None

connect

connect() -> None;

Returns: None

disconnect

disconnect() -> None;

Returns: None

bias

bias() -> None;

Returns: None

get_data

get_data() -> Response;

Returns: Response

get_converted_data

get_converted_data() -> Response;

Returns: Response

start_streaming

start_streaming(duration: float = 10, delay: float = 0.1, print_data: bool = True) -> None;
ParameterTypeDefault
durationfloat10
delayfloat0.1
print_databoolTrue

Returns: None

pynetft.Response

class Response;

Fields

NameTypeDefaultMutability
rdt_sequenceint0Mutable
ft_sequenceint0Mutable
statusint0Mutable
FTDatalist[int | float]field(default_factory=lambda: [0] * 6)Mutable