{"id":27384,"library":"seqdiag","title":"seqdiag","description":"seqdiag generates sequence-diagram images from text, part of the blockdiag family. Current version 3.0.0, requires Python >=3.7. Release cadence is sporadic.","status":"active","version":"3.0.0","language":"python","source_language":"en","source_url":"https://github.com/blockdiag/nwdiag","tags":["sequence-diagram","diagram","ascii-art","blockdiag"],"install":[{"cmd":"pip install seqdiag","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Core blockdiag framework required for rendering","package":"blockdiag","optional":false},{"reason":"Image generation support (for PNG output)","package":"Pillow","optional":false}],"imports":[{"note":"The top-level module does not expose common functions; import submodules.","wrong":"import seqdiag (alone)","symbol":"seqdiag","correct":"from seqdiag import parser, builder, drawer"},{"note":"There is no BlockDiag class in seqdiag; use blockdiag directly.","wrong":"from seqdiag import BlockDiag","symbol":"BlockDiag","correct":"from blockdiag import parser, builder, drawer"}],"quickstart":{"code":"from seqdiag import parser, builder, drawer\nimport codecs\n\n# Read a .seqdiag file (or use a string)\ndiagram_text = \"\"\"\nseqdiag {\n  A -> B [label = \"request\"];\n  B -> A [label = \"response\"];\n}\n\"\"\"\n\ntree = parser.parse_string(diagram_text)\ndiagram = builder.ScreenNodeBuilder.build(tree)\n\ndrawer.draw(diagram, 'output.png', 'PNG')\n","lang":"python","description":"Generate a sequence diagram from a text description and save as PNG."},"warnings":[{"fix":"Use seqdiag.parser.parse_string() instead of the deprecated top-level seqdiag.parse().","message":"In seqdiag 3.0.0, the API changed: parser.parse_string() is the canonical way; the old top-level functions are gone.","severity":"breaking","affected_versions":"<=2.x"},{"fix":"Install fonts or set environment variable BLOCKDIAG_FONT_PATH.","message":"The seqdiag command-line tool requires the font configuration to be set correctly. Without it, generated images may lack text.","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 'from seqdiag import parser' and 'parser.parse_string(your_text)'.","cause":"seqdiag 3.0.0 removed the top-level parse() function.","error":"ImportError: cannot import name 'parse' from 'seqdiag'"},{"fix":"Run 'pip install seqdiag[all]' to install all dependencies including Pillow.","cause":"seqdiag's console script may not be installed if dependencies are missing.","error":"seqdiag: command not found"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}