Nate

class pyniryo_nate.Nate(hostname: str = '', login: tuple[str, str] = ('', ''), device_id: str = '')[source]

Bases: object

Initialize a client to communicate with the Nate API.

Parameters:
  • hostname (str) – The hostname of the Nate API. It can be an IP address or a domain name. If empty, retrieve it from the environment variable NATE_HOSTNAME, defaulting to localhost.

  • login (tuple[str, str]) – A tuple containing the username and password to use for authentication. If empty, retrieve them from the environment variables NATE_USERNAME and NATE_PASSWORD. A program run by the robot needs none: the robot sets NATE_EXECUTION_TOKEN, which logs the program in.

  • device_id (str) – The identifier of the robot expected at hostname, as its certificate names it. An address changes from one network to the next and may be taken by another robot; with a device ID, a robot that is not this one is refused before any credential is sent. If empty, retrieve it from the environment variable NATE_DEVICE_ID; if that is not set either, the first robot reached binds the client for its lifetime.

Attributes

Methods

close

Clean up resources used by the client, and ensure that any background tasks are properly terminated.

auth: Auth
users: Users
robot: Robot
device: Device
firmware: Firmware
network: Network
programs: Programs
projects: Projects
motion_planner: MotionPlanner
metrics: Metrics
io: IO
close() → None[source]

Clean up resources used by the client, and ensure that any background tasks are properly terminated. After calling this method, the client should not be used anymore.

Return type:

None