{"id":24210,"library":"passagemath-planarity","title":"passagemath-planarity","description":"Wraps the edge addition planarity suite for graph planarity testing and embedding in passagemath. Version 10.8.4, requires Python >=3.11, <3.15. Part of the passagemath ecosystem. Release cadence follows passagemath.","status":"active","version":"10.8.4","language":"python","source_language":"en","source_url":"https://github.com/passagemath/passagemath-planarity","tags":["graph planarity","planar embedding","edge addition","passagemath","graph theory"],"install":[{"cmd":"pip install passagemath-planarity","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The module is inside the passagemath namespace.","wrong":"import planarity","symbol":"planarity","correct":"from passagemath.planarity import planarity"}],"quickstart":{"code":"from passagemath.planarity import planarity\n# Test planarity of a graph given as adjacency list\n# Graph: triangle with an extra isolated vertex\nadj = {0: [1,2], 1: [0,2], 2: [0,1], 3: []}\nresult = planarity.is_planar(adj)\nprint(result)  # True\n# Get a planar embedding\ntry:\n    embedding = planarity.planar_embedding(adj)\n    print(embedding)\nexcept Exception as e:\n    print(e)","lang":"python","description":"Quick example showing planarity test and planar embedding extraction."},"warnings":[{"fix":"Use the correct import path: from passagemath.planarity import planarity","message":"The library is part of the passagemath ecosystem. Do not import 'planarity' directly; always use 'from passagemath.planarity import planarity'.","severity":"gotcha","affected_versions":">=10.8"},{"fix":"Use the recommended import: from passagemath.planarity import planarity","message":"Some older examples use 'passagemath.planarity.planarity' (duplicated module name). This still works but is redundant; the canonical import is 'from passagemath.planarity import planarity'.","severity":"deprecated","affected_versions":"10.8.x"},{"fix":"Use a Python version from 3.11 to 3.14.","message":"Requires Python >=3.11, <3.15. Installing on Python 3.15+ will fail.","severity":"gotcha","affected_versions":"10.8.4"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from passagemath.planarity import planarity' instead of 'import planarity'.","cause":"Importing the module directly without the passagemath namespace.","error":"ModuleNotFoundError: No module named 'planarity'"},{"fix":"Run 'pip install passagemath-planarity' which pulls in the passagemath base package.","cause":"The passagemath package is not installed.","error":"ModuleNotFoundError: No module named 'passagemath'"},{"fix":"Suppress warnings if needed with 'import warnings; warnings.filterwarnings(\"ignore\", message=\".*experimental.*\")'.","cause":"The library might emit a warning on import; it is still usable.","error":"UserWarning: The planarity module is experimental. API may change."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}