{"id":28035,"library":"passagemath-tdlib","title":"passagemath-tdlib","description":"A Python wrapper for the tdlib library for tree decomposition computations. Provides high-performance tree decomposition algorithms including heuristics, exact methods, and dynamic programming FPT algorithms. Version 10.8.4, part of the passagemath ecosystem.","status":"active","version":"10.8.4","language":"python","source_language":"en","source_url":"https://github.com/passagemath/passagemath-tdlib","tags":["tree decomposition","tdlib","graph theory","fpt","passagemath","combinatorics"],"install":[{"cmd":"pip install passagemath-tdlib","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for graph objects and heavy sage integration","package":"passagemath-sage","optional":false},{"reason":"Core passagemath library required","package":"passagemath-standard","optional":false}],"imports":[{"wrong":"from passagemath.tdlib.tree_decomposition import TreeDecomposition","symbol":"TreeDecomposition","correct":"from passagemath_tdlib import TreeDecomposition"}],"quickstart":{"code":"from passagemath.graphs.graph import Graph\nfrom passagemath.tdlib.tree_decomposition import TreeDecomposition\n\n# Create a simple graph (3-cycle)\nG = Graph([(0,1), (1,2), (2,0)])\n\n# Compute a tree decomposition using a heuristic\ntd = TreeDecomposition(G, algorithm='tdlib_heuristic')\nprint(td)\nprint(td.width())","lang":"python","description":"Basic usage: create a graph and compute a tree decomposition via tdlib heuristic."},"warnings":[{"fix":"Use `pip install passagemath` to get a compatible environment.","message":"The passagemath ecosystem (10.x) is not compatible with SageMath 9.x/10.0. Install the correct passagemath metapackage.","severity":"breaking","affected_versions":">=10.0"},{"fix":"Use Python 3.11–3.14.","message":"Requires Python >=3.11 and <3.15. Older Python versions are not supported.","severity":"breaking","affected_versions":"10.8.4"},{"fix":"Install tdlib via system package manager (e.g., `apt install libtdlib-dev`) or compile from source.","message":"tdlib must be installed separately: it is a C++ library not bundled with the Python package. The Python wrapper will not work without it.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'10.8.4':32 'algorithm':21,30 'combinator':45 'comput':14 'decomposit':13,20,39 'dynam':27 'ecosystem':37 'exact':24 'fpt':29,43 'graph':41 'heurist':23 'high':17 'high-perform':16 'includ':22 'librari':10 'method':25 'part':33 'passagemath':2,36,44 'passagemath-tdlib':1 'perform':18 'program':28 'provid':15 'python':5 'tdlib':3,9,40 'theori':42 'tree':12,19,38 'version':31 'wrapper':6","created_at":"2026-05-09T05:53:23.110159+00:00","updated_at":"2026-05-09T05:53:23.110159+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'TreeDecomposition' from 'passagemath_tdlib' (/tmp/tmp0c1ak2fz/venv/lib/python3.12/site-packages/passagemath_tdlib/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/passagemath/passagemath","docs":"https://passagemath.org/docs/latest","changelog":"https://github.com/passagemath/passagemath/releases","pypi":"https://pypi.org/project/passagemath-tdlib/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}