Registry / data / spherogram

spherogram

JSON →
library2.4.1pypypi✓ verified 84d ago

A Python library for spherical diagrams in 3-manifold topology, including links, knots, braids, tangles, and planar diagrams. Current version 2.4.1 supports ribbon concordance tools, bridge number bounds, and knot Floer homology. Release cadence is irregular, with major features in even-numbered versions.

pip install spherogram
INSTALL
IMPORT
SIG · SPHEROGRAM
S
spherogram
datapythonv2.4.1
Install
4.3s avg
Import
676ms
Disk
169MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.4.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.3s · import 0.676s · 169MB
169MB installed
● package 169MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Link
from spherogram import Link
from spherogram.links import Link
Top-level import is correct; submodule imports may break
Knot
from spherogram import Knot
Tangle
from spherogram import Tangle
from spherogram.tangles import Tangle
Submodule path may not be stable

Creates a link from a named knot (e.g. 'K11n34') and computes its bridge number and Jones polynomial.

from spherogram import Link L = Link('K11n34') print(L.bridge_number()) print(L.jones_polynomial())
Debug
Known issues
breakingVersion 2.0 changed the sign convention for knot signature (positive knots now have negative signature) and braid generator signs (positive generators give positive crossings). Older code expecting old signs will produce wrong results.
fix
Update any code relying on signature signs or braid generator orientation.
affects: >=2.0
breakingThe function `Link.simplify()` was significantly improved in 2.1 but may change the diagram representation; do not depend on stable crossing order after simplification.
fix
Do not assume crossing indices or ordering remain constant after simplify().
affects: >=2.1
deprecatedAutomatic import of `snappy_16_knots` in 2.4.1 may be removed in future; always import explicitly if needed.
fix
Use `from snappy_16_knots import ...` explicitly.
affects: 2.4.1+
gotchaMany functions return `Link` objects that may have duplicate crossings or be non-minimal; always call `simplify()` before computing invariants if diagram size matters.
fix
After constructing a Link, call L.simplify() for a reduced diagram.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'spherogram'
spherogram not installed or installed in wrong environment.
fix
Run `pip install spherogram` in the target Python environment.
ImportError: cannot import name 'Link' from 'spherogram.links'
Using incorrect submodule import path. The correct symbol is at top level.
fix
Change to `from spherogram import Link`.
ValueError: Unrecognized knot name
Knot name not in the internal database or string malformed.
fix
Use standard notation like 'K11n34' (K = knot, 11 crossings, n = non-alternating, 34th in table). Check spherogram's knot_table for available names.
Upgrade
Version history
2.4.1latest on PyPI · released Feb 9, 2026
Audit
Dependencies
snappyrequiredRequired for snapPy integration and auto-import of snappy_16_knots
Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
1
Resources
spherogram — pip install spherogram · libregistry