Trident: The Aquarium API

Trident is the Python scripting API for Aquarium, the software that runs the UW BIOFAB. The code respository is available to members of the Klavins lab GitHub organization, which consists of lab members and collaborators. There is also a Javascript version of Trident available to that group.

Trident is a python scripting API wrapper for Aquarium. With Trident, you may pull down data, submit plans, create samples, and more.

Getting Started

Pydent can be install using pip:

pip3 install pydent --upgrade

To use trident, you’ll need an Aquarium login, password, and url

from pydent import AqSession

session = AqSession("user", "password", "http://you.aquarium.url")

sample = session.Sample.find(1)


More Installation Instructions

For more information on installation, checkout the Installation

Using Trident

Below is an example of how to submit a plan. Check Trident Examples for more examples.

# session = AqSession("user", "password", "http://you.aquarium.url")

primer = session.SampleType.find(1).samples[-1]

# get Order Primer operation type
ot = session.OperationType.find(328)

# create an operation
order_primer = ot.instance()

# set io
order_primer.set_output("Primer", sample=primer)
order_primer.set_input("Urgent?", value="no")

# create a new plan
p = models.Plan(name="MyPlan")

# connect the plan to the session

# add the operation to the plan

# create the plan on the server

# changes to plan can be saved (not necessary here)

# estimate the cost

# validate the plan

# show the plan

# submit the plan
p.submit(session.current_user, session.current_user.budgets[0])

# print("You may open you plan here: {}".format(session.url + "/plans?plan_id={}".format(
print("Your plan was successfully submitted!")
Your plan was successfully submitted!


To contribute, please checkout Contributing.