squarify
Pure Python implementation of the squarify treemap layout algorithm
Decision gist · record as of 2026-08-14
Yes, if you need treemap layout computation. The package has no dependencies, installs easily, and solves a specific algorithmic problem well. The aging maintenance status is not a blocker for a stable, narrow-scope algorithm library, but verify that the implementation meets your precision or performance requirements before adopting it in production.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Maintenance is aging—last release was 2024-07-19, and the repository remains active and unarchived.
License · maintenance · safety
Apache License 2.0 (permissive) — Licensed under Apache License 2.0, a permissive license that allows commercial and private use with minimal restrictions.
last release 2024-07-19 (756 days) · last repo commit 2025-03-29 · 333 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 279,662 downloads/mo, #8,118 on PyPI
Alternatives
Verify before relying
import squarify
values = [500, 433, 78, 25, 25, 7]
values = squarify.normalize_sizes(values, 700, 433)
rects = squarify.squarify(values, 0, 0, 700, 433)- Whether the package works with Python versions older than 3.8 despite the description mentioning Python 2 compatibility.
- Whether Matplotlib is required for all use cases or only when using the plot() helper function.
- Performance characteristics and numerical precision of the implementation for large datasets.
What it is and what it does
Squarify is a pure Python implementation of the squarified treemap layout algorithm based on the academic work by Bruls, Huizing, and van Wijk. It takes a list of numeric values and a rectangular coordinate space, then computes the positions and dimensions of rectangles whose areas are proportional to the input values. The algorithm aims to produce rectangles with aspect ratios close to square, making treemaps more readable than naive approaches.
The package provides three main functions: squarify() for basic rectangle computation, padded_squarify() for adding visual gaps between rectangles, and a plot() helper that generates Matplotlib-based visualizations. It also includes normalize_sizes() to scale input values to match the target area. The output is a list of dictionaries, each containing x, y, dx, and dy coordinates suitable for rendering with visualization libraries or custom applications.
Use it for
- Generate treemap layouts for visualizing hierarchical data like file system sizes or organizational structures.
- Compute rectangle coordinates for custom rendering in web-based visualization frameworks.
- Create Matplotlib-based treemap plots with optional padding and custom colors for exploratory data analysis.
- Normalize and layout data values to fit within a bounded rectangular space for dashboard displays.
- Build interactive treemap visualizations by obtaining rectangle coordinates for further processing.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need treemap layout computation.
The package has no dependencies, installs easily, and solves a specific algorithmic problem well. The aging maintenance status is not a blocker for a stable, narrow-scope algorithm library, but verify that the implementation meets your precision or performance requirements before adopting it in production.
Install
squarify on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance is aging—last release was 2024-07-19, and the repository remains active and unarchived.
License in practice
Licensed under Apache License 2.0, a permissive license that allows commercial and private use with minimal restrictions.
Quickstart
import squarify
values = [500, 433, 78, 25, 25, 7]
values = squarify.normalize_sizes(values, 700, 433)
rects = squarify.squarify(values, 0, 0, 700, 433)
Verify before relying
- Whether the package works with Python versions older than 3.8 despite the description mentioning Python 2 compatibility.
- Whether Matplotlib is required for all use cases or only when using the plot() helper function.
- Performance characteristics and numerical precision of the implementation for large datasets.
Package facts
| License | Apache License 2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 756 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 279,662 / month, #8,118 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: squarify-0.4.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “treemap layout algorithm”
- squarifyComputes treemap layout rectangles from a list of values using the…
- stretchablestretchable is a Python layout engine that implements CSS Block,…
- python-bidiConverts bidirectional text (mixed left-to-right and right-to-left…
Give your agent the search over MCP, or paste the wish link into any chat.
More Graphics packages
Pillow adds image processing capabilities to Python, providing file format support, efficient pixel data handling, and image manipulation operations.
Install it if you need to work with images in Python—it is the de facto standard for this task.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Enables matplotlib figures to display inline directly within Jupyter notebooks and IPython environments instead of in separate windows.
PyMuPDF extracts, renders, converts, and manipulates PDF and other document formats (XPS, EPUB, images, Office files via Pro) with high performance, providing text, tables, images, and metadata with precise layout information.
The AGPL license requires careful review if you are building proprietary software—commercial licensing is available from Artifex.
pypdfium2 is a Python binding to PDFium that enables PDF rendering, inspection, manipulation, and creation through a ctypes interface to Google's PDFium library.
Install it if you need PDF rendering, inspection, or manipulation in Python; the medium install friction is offset by comprehensive platform support.
Altair is a declarative Python library for creating interactive statistical visualizations by writing simple, readable code that compiles to Vega-Lite specifications.
See also rectpack · rectangle-packer · PyRect · grandalf · shapely-polyskel · pixelhog · qrdet · pdfplumber · py3dbp · treelib