skillfed

primer3-py

Simple primer design and analysis

primer3-py v2.3.0 435.4K downloads/30d#6,679 on PyPI193
Copyleft license GPLv2 Active released

What it is and what it does

primer3-py is a Python wrapper around the Primer3 library, a widely-used tool for PCR primer design and oligo analysis. It provides direct access to thermodynamic calculations—such as melting temperature (Tm) and hairpin structure formation—through a simple Python API, avoiding the overhead of subprocess calls. The package includes bindings to Primer3's full design engine for automated primer selection pipelines.

The core appeal is speed: routine oligo analysis runs roughly 1000X faster than traditional subprocess-based wrappers. It supports modern Python versions (3.8–3.14) and is distributed as pre-compiled wheels for common platforms, minimizing installation friction. The package is actively maintained and documented, though users are directed to the upstream Primer3 team for design-engine-specific questions.

Use it for:

  • Calculate melting temperature and secondary structure stability for DNA sequences in high-throughput screening or assay design workflows.
  • Batch validate primer pairs for PCR experiments by computing thermodynamic properties without spawning external processes.
  • Integrate primer design into automated laboratory pipelines using Primer3's design engine with Python parameter control.
  • Analyze oligonucleotide libraries for off-target binding risk by computing hairpin formation across many sequences.
  • Prototype and benchmark primer selection algorithms that depend on fast, repeated Tm and structure calculations.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

primer3-py wraps the Primer3 library to provide fast oligo thermodynamic analysis (melting temperature, hairpin formation) and primer design through a Python API.

Yes, if you need fast oligo thermodynamic analysis or primer design in Python for research or open-source projects. The GPLv2 license is a hard blocker for proprietary software. Install friction is moderate due to compiled bindings, but pre-built wheels for common platforms and Python versions make setup straightforward. No known vulnerabilities and active maintenance support the choice.

Install

primer3-py on PyPI

pip

pip install primer3-py

uv

uv add primer3-py

poetry

poetry add primer3-py

Installing primer3-py

Before you install

Medium install friction due to compiled C/Cython bindings, but wheels are pre-built for common platforms (macOS, Linux, Windows) across Python 3.8–3.14. Repository is actively maintained with recent commits and no archived status.

License in practice

GPLv2 copyleft license requires derivative works and distributions to be licensed under GPLv2 and source made available; suitable for research and open-source projects but may conflict with proprietary software licensing.

Quickstart

pip install primer3-py
import primer3
tm = primer3.calc_tm('GTAAAACGACGGCCAGT')
print(tm)  # 49.16808228911765
result = primer3.calc_hairpin('CCCCCATCCGATCAGGGGG')
print(result.tm)  # 34.15

Requires Python 3.8 or later; compiled wheels available for macOS, Linux, and Windows but may require a C compiler on unsupported platforms.

Verify before relying

  • Whether the Primer3 design engine bindings are production-ready or primarily for research use given the disclaimer about contacting the Primer3 dev team for support.
  • Performance characteristics and memory overhead for large-scale batch oligo analysis compared to the ~1000X speedup claim over subprocess wrappers.

Package facts

License GPLv2 (copyleft)
Python support supports the current Python release (>=3.8)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 220 days since the last release
Last repo commit
First released
Downloads 435,399/month — #6,679 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: primer3_py-2.3.0-cp310-cp310-macosx_10_14_x86_64.whl; primer3_py-2.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; primer3_py-2.3.0-cp310-cp310-win_amd64.whl; primer3_py-2.3.0-cp311-cp311-macosx_10_14_x86_64.whl; primer3_py-2.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; primer3_py-2.3.0-cp311-cp311-win_amd64.whl; primer3_py-2.3.0-cp312-cp312-macosx_10_14_x86_64.whl; primer3_py-2.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; primer3_py-2.3.0-cp312-cp312-win_amd64.whl; primer3_py-2.3.0-cp313-cp313-macosx_10_14_x86_64.whl; primer3_py-2.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; primer3_py-2.3.0-cp313-cp313-win_amd64.whl; primer3_py-2.3.0-cp314-cp314-macosx_10_15_x86_64.whl; primer3_py-2.3.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; primer3_py-2.3.0-cp314-cp314t-macosx_10_15_x86_64.whl; primer3_py-2.3.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; primer3_py-2.3.0-cp314-cp314t-win_amd64.whl; primer3_py-2.3.0-cp314-cp314-win_amd64.whl; primer3_py-2.3.0-cp38-cp38-macosx_10_14_x86_64.whl; primer3_py-2.3.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Development Status :: 5 - Production/StableIntended Audience :: Science/ResearchLicense :: OSI Approved :: GNU General Public License v2 (GPLv2)Programming Language :: CProgramming Language :: CythonProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Bio-Informatics

Tags

primer design pythonoligo analysis thermodynamicsmelting temperature calculationprimer3 wrapperdna primer designhairpin structure predictionpcr primer selection
bioinformaticspcr-designdna-analysis

More Bio-Informatics packages