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.
| Need | API |
|---|---|
| Stream through an iterator or callback | Client |
| Configure connection and calibration | Configuration and calibration |
| Read immutable data models | Samples and health |
| Serialize stable states and units | Enumerations |
| Handle structured failures | Exceptions |
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;| Parameter | Type | Default |
|---|---|---|
host | str | Required |
port | int | 49152 |
num_samples | int | 1 |
count_per_force | float | None | None |
count_per_torque | float | None | None |
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;| Parameter | Type | Default |
|---|---|---|
duration | float | 10 |
delay | float | 0.1 |
print_data | bool | True |
Returns: None
pynetft.Response
class Response;Fields
| Name | Type | Default | Mutability |
|---|---|---|---|
rdt_sequence | int | 0 | Mutable |
ft_sequence | int | 0 | Mutable |
status | int | 0 | Mutable |
FTData | list[int | float] | field(default_factory=lambda: [0] * 6) | Mutable |