passagemath-homfly
passagemath: Homfly polynomials of knots/links with libhomfly
What it is and what it does
passagemath-homfly wraps libhomfly, a C library for computing Homfly polynomials—a key invariant in knot theory. It exposes a Cython interface allowing Python developers to compute polynomial invariants for knots and links. The package is part of the passagemath ecosystem, a modularized fork designed for pip-installable distribution and integration with the scientific Python ecosystem.
The library accepts knot and link diagrams in a specific string format and returns polynomial coefficients as dictionaries. It is actively maintained with recent releases and broad platform support including macOS, Linux, and Windows. The package depends on cysignals for signal handling and requires Python 3.11 or later.
Use it for:
- Compute Homfly polynomial invariants for knot diagrams in research or educational settings.
- Integrate knot invariant computation into larger mathematical software pipelines.
- Verify knot equivalence or distinguish non-equivalent knots using polynomial invariants.
- Analyze topological properties of links in computational geometry or topology projects.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python interface to libhomfly for computing Homfly polynomials of knots and links.
Yes, if you need to compute Homfly polynomials for knots and links. The package is actively maintained, supports current Python versions, has no known vulnerabilities, and provides convenient pip installation with pre-built wheels. The copyleft GPL-2.0-or-later license requires that derivative works remain open-source. Install friction is moderate but manageable for the specialized mathematical use case.
Install
passagemath-homfly on PyPI
pip
pip install passagemath-homflyuv
uv add passagemath-homflypoetry
poetry add passagemath-homflyInstalling passagemath-homfly
Before you install
Medium install friction due to compiled wheel dependencies. Package is actively maintained with releases within days, supports Python 3.11–3.14, and provides pre-built wheels across macOS, Linux, and Windows platforms.
License in practice
Licensed under GPL-2.0-or-later (copyleft). Use requires compliance with GPLv2+ terms; derivative works and distributions must be released under compatible open-source licenses.
Quickstart
pip install passagemath-homfly
from sage.libs.homfly import homfly_polynomial_dict
trefoil = '1 6 0 1 1 -1 2 1 0 -1 1 1 2 -1 0 1 1 1 2 1'
result = homfly_polynomial_dict(trefoil)
Requires Python 3.11–3.14; depends on cysignals runtime library.
Verify before relying
- Exact API surface and supported knot/link representation formats beyond the example shown.
- Performance characteristics and scalability limits for large or complex knot diagrams.
- Compatibility details with different cysignals versions.
Package facts
| License | GPL-2.0-or-later (copyleft) |
| Python support | supports the current Python release (<3.15,>=3.11) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — cysignals |
| Maintenance | actively maintained — 5 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,335/month — #14,169 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: passagemath_homfly-10.8.9-cp311-cp311-macosx_13_0_arm64.whl; passagemath_homfly-10.8.9-cp311-cp311-macosx_13_0_x86_64.whl; passagemath_homfly-10.8.9-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; passagemath_homfly-10.8.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; passagemath_homfly-10.8.9-cp311-cp311-musllinux_1_2_aarch64.whl; passagemath_homfly-10.8.9-cp311-cp311-musllinux_1_2_x86_64.whl; passagemath_homfly-10.8.9-cp311-cp311-win_amd64.whl; passagemath_homfly-10.8.9-cp312-cp312-macosx_13_0_arm64.whl; passagemath_homfly-10.8.9-cp312-cp312-macosx_13_0_x86_64.whl; passagemath_homfly-10.8.9-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; passagemath_homfly-10.8.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; passagemath_homfly-10.8.9-cp312-cp312-musllinux_1_2_aarch64.whl; passagemath_homfly-10.8.9-cp312-cp312-musllinux_1_2_x86_64.whl; passagemath_homfly-10.8.9-cp312-cp312-win_amd64.whl; passagemath_homfly-10.8.9-cp313-cp313-macosx_13_0_arm64.whl; passagemath_homfly-10.8.9-cp313-cp313-macosx_13_0_x86_64.whl; passagemath_homfly-10.8.9-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; passagemath_homfly-10.8.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; passagemath_homfly-10.8.9-cp313-cp313-musllinux_1_2_aarch64.whl; passagemath_homfly-10.8.9-cp313-cp313-musllinux_1_2_x86_64.whl
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
passagemath-categoriesProvides Sage categories, basic rings,…
copyleft · top 15,000 on PyPI
passagemath-objectsProvides a foundational object system,…
copyleft · top 15,000 on PyPI
passagemath-gapProvides Python interfaces to the GAP…
copyleft · top 15,000 on PyPI
sagemathSageMath is a comprehensive open-source…
copyleft · top 15,000 on PyPI
sphinxcontrib-jsmathA Sphinx extension that renders mathematical…
permissive · top 1,000 on PyPI
fpylllfpylll is a Python wrapper for the fplll…
unclear · top 15,000 on PyPI
audmathaudmath provides mathematical functions…
permissive · top 15,000 on PyPI
pyudorandomGenerates pseudorandom numbers using algebraic…
unclear · top 15,000 on PyPI