Python
Integrate any python script with TofuPilot's Python Client.

Overview
Many hardware teams today use Python for their test scripts. The TofuPilot Python client, our recommended tool for accessing TofuPilot's API, is easy to install and integrates smoothly into existing code with minimal changes.
Installation
-
Install the TofuPilot open-source Python client:
pip install tofupilot
-
Generate and add your API-KEY to your environment variables.
-
Go to the application and create a Procedure by clicking on Create Procedure on the Procedure page. Copy the
procedure_id
(the first by default is "FVT1"). -
Add it to your test like this:
main.pyfrom tofupilot import TofuPilotClient def main(): client = TofuPilotClient() client.create_run( procedure_id="FVT1", # Create the procedure first in the Application unit_under_test={ "serial_number": "PCB1A001", "part_number": "PCB1", }, run_passed=True, # Set the Run status to Pass ) if __name__ == "__main__": main()
Your Run are uploaded to your TofuPilot account using the Unit Under Test serial number and linked to the Procedure with the procedure_id
. You can view uploaded Runs on the Runs page.
Discover more TofuPilot's Python Client integrations in the Test Runs or REST API sections.
Contribute
The TofuPilot Python client is open source under an MIT license, with a contribution guide available on GitHub. For any issues or feature requests, please open an issue on GitHub so we can assist you best.