Skip to content
Python library for generating Autoprotocol
Branch: master
Clone or download
rhysormond Bump version to 6.1.1 (#224)
Update the changelog and bump the version.
Latest commit 10ba45d Jan 27, 2020
Type Name Latest commit message Commit time
Failed to load latest commit information.
autoprotocol-python SublimeText Snippets Implement LiquidHandle instruction (ASC-032) (#163) Jul 24, 2018
autoprotocol Bump version to 6.1.1 (#224) Jan 27, 2020
docs Bump version to 6.1.1 (#224) Jan 27, 2020
test Fix well_from_shape bug (#223) Jan 27, 2020
.arcconfig Remove phabricator URI (#187) Feb 21, 2019
.coveragerc exclude __repr__ functions from coverage Jan 28, 2016
.pylintrc Use pylint for linting (#160) Jun 22, 2018
.travis.yml Upgrade ApPy to Python 3 (#206) Aug 22, 2019
setup.cfg Bump version to 6.0.0 for release (#207) Aug 22, 2019 pin pytest-cov package version so docs build (#216) Oct 10, 2019
tox.ini Upgrade ApPy to Python 3 (#206) Aug 22, 2019


Autoprotocol Python Library

PyPI Version Build Status Gitter Chat

Autoprotocol is the standard way to express experiments in life science. This repository contains a python library for generating Autoprotocol.


To work from the latest stable release:

pip install autoprotocol

check the the releases for more information about the changes that will be downloaded.

Alternatively to get more up-to-date features:

git clone
cd autoprotocol-python
python install

check the changelog for information about features included on master but not yet released.

Building a Protocol

A basic protocol is written by declaring Protocol.ref objects and acting on them with Protocol.instruction methods.

import json
from autoprotocol.protocol import Protocol

# instantiate a protocol object
p = Protocol()

# generate a ref
# specify where it comes from and how it should be handled when the Protocol is done
plate = p.ref("test pcr plate", id=None, cont_type="96-pcr", discard=True)

# generate seal and spin instructions that act on the ref
# some parameters are explicitly specified and others are left to vendor defaults

# serialize the protocol as Autoprotocol JSON
print(json.dumps(p.as_dict(), indent=2))

which prints

  "instructions": [
      "op": "seal",
      "object": "test pcr plate",
      "type": "foil",
      "mode": "thermal",
      "mode_params": {
        "temperature": "165:celsius",
        "duration": "1.5:second"
      "op": "spin",
      "object": "test pcr plate",
      "acceleration": "1000:g",
      "duration": "1:minute"
  "refs": {
    "test pcr plate": {
      "new": "96-pcr",
      "discard": true


Select SublimeText snippets are included with this repository. To use them copy the autoprotocol-python SublimeText Snippet folder to your local Sublime /Packages/User directory.


For more information, see the documentation.


For more information, see CONTRIBUTING.

You can’t perform that action at this time.