primer3-py
Simple primer design and analysis
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-pyuv
uv add primer3-pypoetry
poetry add primer3-pyInstalling 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
Tags
More Bio-Informatics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
biopythonBiopython provides Python tools for…
unclear · top 5,000 on PyPI
firecrawl-pyClient library for the Firecrawl API that…
permissive · top 5,000 on PyPI
intervaltreeA self-balancing interval tree data structure…
permissive · top 5,000 on PyPI
albumentationsAlbumentations applies image transformations to…
permissive · top 5,000 on PyPI
PubChemPyPubChemPy is a Python wrapper around the…
permissive · top 5,000 on PyPI
logomakerLogomaker creates customized sequence…
permissive · top 15,000 on PyPI
nh3nh3 sanitizes HTML by removing unsafe tags and…
permissive · top 1,000 on PyPI
CoolPropCoolProp provides thermodynamic and transport…
permissive · top 5,000 on PyPI
pyteomicsPyteomics provides Python tools for proteomics…
permissive · top 15,000 on PyPI
alchemlybalchemlyb parses molecular dynamics simulation…
permissive · top 15,000 on PyPI
pymbarpymbar implements the multistate Bennett…
permissive · top 15,000 on PyPI
trioTrio is an async I/O library that lets you…
permissive · top 1,000 on PyPI
canteraCantera is a suite of tools for chemical…
permissive · top 15,000 on PyPI
pyperfpyperf is a toolkit for writing, running, and…
permissive · top 15,000 on PyPI
pyDOE3pyDOE3 provides functions to construct…
permissive · top 15,000 on PyPI