$npx skillfedfor your agent

squarify

Pure Python implementation of the squarify treemap layout algorithm

With conditionsPyPI GraphicsReleased Jul 2024279.7K downloads / moApache License 2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — squarify-0.4.4-py3-none-any.whl
v0.4.4 · released 2024-07-19

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

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.
Same gist for agents: .md · .json

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.

With conditions

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

LicenseApache License 2.0 permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 756 days since the last release
Last repo commit
First released
Downloads279,662 / month, #8,118 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone 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

Capabilities
treemap layout algorithmsquarified treemaprectangle packing visualizationhierarchical data layouttreemap coordinate computationdata visualization rectanglessquarify algorithm
Topics
treemap-layoutdata-visualizationalgorithm
PyPI keywords
treemapvisualizationsquarifylayoutgraphics

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 Worth it
PyPI · Graphics · released Jul 2026

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.

MIT-CMUcompiled wheel · 3.10+
547.1Mdownloads / mo
fonttools Worth it
PyPI · Text Processing · released May 2026

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.

permissive licensepure Python · 3.10+
235.9Mdownloads / mo
matplotlib-inline Worth it
PyPI · Graphics · released May 2026

Enables matplotlib figures to display inline directly within Jupyter notebooks and IPython environments instead of in separate windows.

BSD-3-Clausepure Python · 3.9+
130.5Mdownloads / mo
pymupdf Worth it
PyPI · Libraries · released Aug 2026

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.

AGPLcompiled wheel · 3.10+
114.9Mdownloads / mo
pypdfium2 Worth it
PyPI · Libraries · released Aug 2026

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.

permissive licensecompiled wheel · 3.6+
76.9Mdownloads / mo
altair Worth it
PyPI · Graphics · released Jun 2026

Altair is a declarative Python library for creating interactive statistical visualizations by writing simple, readable code that compiles to Vega-Lite specifications.

BSD-3-Clausepure Python · 3.10+
54.5Mdownloads / mo

See also rectpack · rectangle-packer · PyRect · grandalf · shapely-polyskel · pixelhog · qrdet · pdfplumber · py3dbp · treelib