=============================
Autoprotocol Python Library
=============================
.. image:: https://img.shields.io/pypi/v/autoprotocol.svg?maxAge=86400
:target: https://pypi.python.org/pypi/autoprotocol
:alt: PyPI Version
.. image:: https://github.com/autoprotocol/autoprotocol-python/workflows/CI/badge.svg?branch=master
:target: https://github.com/autoprotocol/autoprotocol-python/actions?query=workflow%3ACI+branch%3Amaster
:alt: Build Status
.. image:: https://codecov.io/gh/autoprotocol/autoprotocol-python/branch/master/graph/badge.svg
:target: https://codecov.io/gh/autoprotocol/autoprotocol-python
:alt: Code Coverage
.. image:: https://img.shields.io/pypi/dm/autoprotocol?logo=pypi
:target: https://autoprotocol-python.readthedocs.io
:alt: PyPI - Downloads
.. image:: https://badges.gitter.im/autoprotocol/autoprotocol-python.svg
:target: https://gitter.im/autoprotocol/autoprotocol-python?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
:alt: Gitter Chat
Autoprotocol_ is the standard way to express experiments in life science. This repository contains a python library for generating Autoprotocol.
Installation
------------
To work from the latest stable release:
.. code-block:: bash
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:
.. code-block:: bash
git clone https://github.com/autoprotocol/autoprotocol-python
cd autoprotocol-python
python setup.py 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 :code:`Protocol.ref` objects and acting on them with :code:`Protocol.instruction` methods.
.. code-block:: python
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
p.seal(
ref=plate,
type="foil",
mode="thermal",
temperature="165:celsius",
duration="1.5:seconds"
)
p.spin(
ref=plate,
acceleration="1000:g",
duration="1:minute"
)
# serialize the protocol as Autoprotocol JSON
print(json.dumps(p.as_dict(), indent=2))
which prints
.. code-block:: json
{
"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
}
}
}
Extras
------
Select SublimeText snippets are included with this repository.
To use them copy the :code:`autoprotocol-python SublimeText Snippet` folder to your local Sublime :code:`/Packages/User` directory.
Documentation
-------------
For more information, see the documentation_.
Contributing
------------
For more information, see CONTRIBUTING_.
.. _Autoprotocol: http://www.autoprotocol.org
.. _releases: http://github.com/autoprotocol/autoprotocol-python/releases
.. _changelog: http://autoprotocol-python.readthedocs.io/en/latest/changelog.html
.. _CONTRIBUTING: http://autoprotocol-python.readthedocs.io/en/latest/CONTRIBUTING.html
.. _documentation: http://autoprotocol-python.readthedocs.org/en/latest/
Raw data
{
"_id": null,
"home_page": "https://github.com/autoprotocol/autoprotocol-python",
"name": "autoprotocol",
"maintainer": "The Autoprotocol Development Team",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "support@strateos.com",
"keywords": "",
"author": "",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/2d/81/68075fd03a8fcd1fda27eb2806151bee1985c76546181c0d9d68f3fe5bbb/autoprotocol-10.3.0.tar.gz",
"platform": null,
"description": "=============================\n Autoprotocol Python Library\n=============================\n\n.. image:: https://img.shields.io/pypi/v/autoprotocol.svg?maxAge=86400\n :target: https://pypi.python.org/pypi/autoprotocol\n :alt: PyPI Version\n\n.. image:: https://github.com/autoprotocol/autoprotocol-python/workflows/CI/badge.svg?branch=master\n :target: https://github.com/autoprotocol/autoprotocol-python/actions?query=workflow%3ACI+branch%3Amaster\n :alt: Build Status\n\n.. image:: https://codecov.io/gh/autoprotocol/autoprotocol-python/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/autoprotocol/autoprotocol-python\n :alt: Code Coverage\n\n.. image:: https://img.shields.io/pypi/dm/autoprotocol?logo=pypi\n :target: https://autoprotocol-python.readthedocs.io\n :alt: PyPI - Downloads\n\n.. image:: https://badges.gitter.im/autoprotocol/autoprotocol-python.svg\n :target: https://gitter.im/autoprotocol/autoprotocol-python?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n :alt: Gitter Chat\n\n\nAutoprotocol_ is the standard way to express experiments in life science. This repository contains a python library for generating Autoprotocol.\n\nInstallation\n------------\n\nTo work from the latest stable release:\n\n.. code-block:: bash\n\n pip install autoprotocol\n\ncheck the the releases_ for more information about the changes that will be downloaded.\n\nAlternatively to get more up-to-date features:\n\n.. code-block:: bash\n\n git clone https://github.com/autoprotocol/autoprotocol-python\n cd autoprotocol-python\n python setup.py install\n\ncheck the changelog_ for information about features included on `master` but not yet released.\n\nBuilding a Protocol\n-------------------\n\nA basic protocol is written by declaring :code:`Protocol.ref` objects and acting on them with :code:`Protocol.instruction` methods.\n\n.. code-block:: python\n\n import json\n from autoprotocol.protocol import Protocol\n\n # instantiate a protocol object\n p = Protocol()\n\n # generate a ref\n # specify where it comes from and how it should be handled when the Protocol is done\n plate = p.ref(\"test pcr plate\", id=None, cont_type=\"96-pcr\", discard=True)\n\n # generate seal and spin instructions that act on the ref\n # some parameters are explicitly specified and others are left to vendor defaults\n p.seal(\n ref=plate,\n type=\"foil\",\n mode=\"thermal\",\n temperature=\"165:celsius\",\n duration=\"1.5:seconds\"\n )\n p.spin(\n ref=plate,\n acceleration=\"1000:g\",\n duration=\"1:minute\"\n )\n\n # serialize the protocol as Autoprotocol JSON\n print(json.dumps(p.as_dict(), indent=2))\n\nwhich prints\n\n.. code-block:: json\n\n {\n \"instructions\": [\n {\n \"op\": \"seal\",\n \"object\": \"test pcr plate\",\n \"type\": \"foil\",\n \"mode\": \"thermal\",\n \"mode_params\": {\n \"temperature\": \"165:celsius\",\n \"duration\": \"1.5:second\"\n }\n },\n {\n \"op\": \"spin\",\n \"object\": \"test pcr plate\",\n \"acceleration\": \"1000:g\",\n \"duration\": \"1:minute\"\n }\n ],\n \"refs\": {\n \"test pcr plate\": {\n \"new\": \"96-pcr\",\n \"discard\": true\n }\n }\n }\n\nExtras\n------\n\nSelect SublimeText snippets are included with this repository.\nTo use them copy the :code:`autoprotocol-python SublimeText Snippet` folder to your local Sublime :code:`/Packages/User` directory.\n\nDocumentation\n-------------\n\nFor more information, see the documentation_.\n\nContributing\n------------\n\nFor more information, see CONTRIBUTING_.\n\n.. _Autoprotocol: http://www.autoprotocol.org\n.. _releases: http://github.com/autoprotocol/autoprotocol-python/releases\n.. _changelog: http://autoprotocol-python.readthedocs.io/en/latest/changelog.html\n.. _CONTRIBUTING: http://autoprotocol-python.readthedocs.io/en/latest/CONTRIBUTING.html\n.. _documentation: http://autoprotocol-python.readthedocs.org/en/latest/\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "Python library for generating Autoprotocol",
"version": "10.3.0",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cfe48d8dda6124fea6c3ff5bf33cc9a3fc543b0dc23d6274efd31756c017889c",
"md5": "5757dc9d778cc9d2d13f153601256f2d",
"sha256": "8263e147e8089c3fd88ab95eecb1e2cda1f6dc5061beaddc77c5eec83481fa35"
},
"downloads": -1,
"filename": "autoprotocol-10.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5757dc9d778cc9d2d13f153601256f2d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 146751,
"upload_time": "2023-04-26T17:28:50",
"upload_time_iso_8601": "2023-04-26T17:28:50.523707Z",
"url": "https://files.pythonhosted.org/packages/cf/e4/8d8dda6124fea6c3ff5bf33cc9a3fc543b0dc23d6274efd31756c017889c/autoprotocol-10.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2d8168075fd03a8fcd1fda27eb2806151bee1985c76546181c0d9d68f3fe5bbb",
"md5": "0cad288488d6772246aedc2631d9f16f",
"sha256": "6f3ec6cc0aca7340c545f274a60dca3f41a263a10f9714c5b1740a857e7ff3ef"
},
"downloads": -1,
"filename": "autoprotocol-10.3.0.tar.gz",
"has_sig": false,
"md5_digest": "0cad288488d6772246aedc2631d9f16f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 135698,
"upload_time": "2023-04-26T17:28:52",
"upload_time_iso_8601": "2023-04-26T17:28:52.825290Z",
"url": "https://files.pythonhosted.org/packages/2d/81/68075fd03a8fcd1fda27eb2806151bee1985c76546181c0d9d68f3fe5bbb/autoprotocol-10.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-26 17:28:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "autoprotocol",
"github_project": "autoprotocol-python",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "autoprotocol"
}