Skip to main content

S4-Clarity Library

https://github.com/SemaphoreSolutions/s4-clarity-lib/actions/workflows/ci.yml/badge.svg?branch=master
Used in numerous labs around the world, the S4-Clarity library provides an easy-to-use integration with the BaseSpace Clarity LIMS API. The package includes:
  • Classes representing familiar Clarity API entities that provide read-write access to most properties.

  • Helper methods that simplify common operations.

  • Base classes for scripts that integrate with Clarity: EPPs, DSAs, and shell scripts.

  • Utilities that help with Clarity-related tasks, such as managing config slices, or automating the completion of a Step.

The S4-Clarity library lets developers interact with the Clarity API in fewer lines of code. With HTTP and XML boilerplate out of the way, you’ll have your integration built in no time at all.

from s4.clarity.scripts import TriggeredStepEPP

LibraryVolume = 2.0
MolWeightBasePair = 660 * 1e6  # micrograms / mol
AssumedBasePairs = 400.0
TargetMolarity = 4.0
Overage = 4


class Normalization (TriggeredStepEPP):
    def on_record_details_enter(self):
        self.prefetch(self.PREFETCH_INPUTS, self.PREFETCH_OUTPUTS)

        for iomap in self.step.details.iomaps:
            library_concentration = iomap.input["Concentration"]
            library_molarity = library_concentration / (AssumedBasePairs * MolWeightBasePair)
            iomap.output["Concentration"] = library_concentration
            iomap.output["Molarity (nM)"] = library_molarity
            iomap.output["Library Vol (uL)"] = LibraryVolume
            iomap.output["Tris HCl (uL)"] = LibraryVolume * (library_molarity / TargetMolarity - 1)

        self.lims.artifacts.batch_update(self.step.details.outputs)


if __name__ == "__main__":
    Normalization.main()

Installation

To install s4-clarity, simply use pip:

$ pip install s4-clarity

Metadata

Release files for s4-clarity 1.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for s4-clarity 1.8.0
File Size Uploaded Provenance Actions
s4_clarity-1.8.0.tar.gz 72.1 kB With provenance Details for s4_clarity-1.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for s4-clarity 1.8.0
File Interpreter ABI Platform Actions
s4_clarity-1.8.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for s4_clarity-1.8.0-py2.py3-none-any.whl

Total release size: 167.4 kB

Release files / s4_clarity-1.8.0.tar.gz

Download URL s4_clarity-1.8.0.tar.gz
Size 72.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d321ee80f55dd96bb0dfa66815b86a9612febacb81307fd80f1ad9ff9534adcb
BLAKE2b-256 checksum
How to use checksums
7615c6f0091b1a2f8e8bd6d2fd4b481cbac3b5b10c44232f9f432ba95b16efe3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2025.

Transparency log

Release files / s4_clarity-1.8.0-py2.py3-none-any.whl

Download URL s4_clarity-1.8.0-py2.py3-none-any.whl
Size 95.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
7cd0880dcd6ca6042cf7a8b1167032731ae87c929ed04ddeed47a26098bdabf2
BLAKE2b-256 checksum
How to use checksums
15afc374e83562f3f6b52d988f0020c7fc41ef8a5be4b35aaff378e1ec6bdc23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2025.

Transparency log

Security for s4-clarity 1.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for s4_clarity-1.8.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page