{"id":24265,"library":"primer3-py","title":"primer3-py","description":"Python bindings for the Primer3 primer design and analysis library. Current version 2.3.0 supports Python 3.8–3.14. Actively maintained, with occasional releases.","status":"active","version":"2.3.0","language":"python","source_language":"en","source_url":"https://github.com/libnano/primer3-py","tags":["primer3","primer design","bioinformatics","DNA","PCR"],"install":[{"cmd":"pip install primer3-py","lang":"bash","label":"PyPI install"}],"dependencies":[],"imports":[{"note":"Wildcard imports discouraged; use explicit import.","wrong":"from primer3 import *","symbol":"bindings","correct":"import primer3"}],"quickstart":{"code":"import primer3\n\nseq = 'AGCAGCGCGTATACGCGTATATACGCGATATCGCGTAGCT'\nresult = primer3.calc_tm(seq)\nprint(result)","lang":"python","description":"Calculate Tm of a DNA sequence."},"warnings":[{"fix":"Use both old and new keys or update code to use list versions.","message":"In v2.0.0, the output dictionary keys changed: list versions of PRIMER_PAIR, PRIMER_LEFT, PRIMER_RIGHT, PRIMER_INTERNAL were added. Code relying on old key shapes may break if not adapted.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Replace primer3.setGlobals(...) with primer3.set_global_flags(...) or pass parameters as dict.","message":"In v1.0.0, setGlobals was removed; use primer3.set_global_flags or direct parameter passing instead.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Validate or sanitize sequences before passing to calc_tm.","message":"calc_tm accepts sequences with ambiguous bases (e.g., 'N') but may raise exceptions for invalid characters. Ensure input is valid DNA.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use primer3.set_global_flags(parameters) instead.","cause":"setGlobals was removed in v1.0.0.","error":"AttributeError: module 'primer3' has no attribute 'setGlobals'"},{"fix":"Use valid keyword arguments: mv_conc, dv_conc, dntp_conc, dna_conc.","cause":"calc_tm uses keyword arguments for salt and divalent concentrations; incorrect param name.","error":"TypeError: calc_tm() got an unexpected keyword argument 'mv_conc'"},{"fix":"Clean sequence with primer3.clean_sequence(seq) or validate manually.","cause":"Sequence contains non-DNA letters or whitespace.","error":"ValueError: Sequence 'XYZ' contains invalid characters"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}