$npx skillfedfor your agent

anytree

Powerful and Lightweight Python Tree Data Structure with various plugins

With conditionsPyPI Python ModulesReleased Apr 202510.5M downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — anytree-2.13.0-py3-none-any.whl
v2.13.0 · released 2025-04-08 · Python <4.0,>=3.9.2

Yes, if you need a simple, dependency-free tree library. The package is stable, supports current Python versions, has no known vulnerabilities, and is widely used (top 5000 on PyPI). The main caveat is that the license is undocumented—verify it meets your requirements before use in proprietary code. Maintenance is aging but not abandoned.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Graphviz must be installed separately on your system if you want to use UniqueDotExporter to generate image files.
  • Low install friction with no runtime dependencies.
  • Maintenance is aging—last release was 493 days ago, though the repository remains active with a recent commit on 2025-04-08 and 1088 stars.

License · maintenance · safety

(unclear) — License status is unclear; the package metadata does not specify a license. Verify licensing terms before use in proprietary or restricted contexts.

last release 2025-04-08 (493 days) · last repo commit 2025-04-08 · 1,088 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 10,482,845 downloads/mo, #1,450 on PyPI

Verify before relying

pip install anytree

from anytree import Node, RenderTree

root = Node("root")
child1 = Node("child1", parent=root)
child2 = Node("child2", parent=root)

for pre, fill, node in RenderTree(root):
    print(f"{pre}{node.name}")
  • Whether graphviz must be installed separately for visualization features to work
  • Performance characteristics with large or deeply nested trees
  • Thread safety of tree operations
Same gist for agents: .md · .json

What it is and what it does

anytree is a pure-Python tree library that lets you build and work with hierarchical data by creating Node objects and linking them via parent-child relationships. You can construct trees from scratch, modify them by reparenting nodes, and traverse them using built-in iterators. The library also includes rendering tools like RenderTree for ASCII visualization and exporters like UniqueDotExporter for generating graph images, plus a NodeMixin base class that lets you add tree capabilities to any existing Python class.

The package is stable and supports Python 3.9 through 3.13 with no external runtime dependencies, making it straightforward to integrate into projects that need to represent or manipulate tree-shaped data—from organizational hierarchies to file systems to abstract syntax trees.

Use it for

  • Build and visualize organizational hierarchies or family trees with parent-child relationships
  • Represent file system structures or directory trees for traversal and analysis
  • Create abstract syntax trees or expression trees for parsing and compiler work
  • Export tree structures to graphviz dot format for diagram generation
  • Add tree functionality to existing classes via NodeMixin without rewriting them

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need a simple, dependency-free tree library.

The package is stable, supports current Python versions, has no known vulnerabilities, and is widely used (top 5000 on PyPI). The main caveat is that the license is undocumented—verify it meets your requirements before use in proprietary code. Maintenance is aging but not abandoned.

Install

anytree on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance is aging—last release was 493 days ago, though the repository remains active with a recent commit on 2025-04-08 and 1088 stars.

Graphviz must be installed separately on your system if you want to use UniqueDotExporter to generate image files.

License in practice

License status is unclear; the package metadata does not specify a license. Verify licensing terms before use in proprietary or restricted contexts.

Quickstart

pip install anytree

from anytree import Node, RenderTree

root = Node("root")
child1 = Node("child1", parent=root)
child2 = Node("child2", parent=root)

for pre, fill, node in RenderTree(root):
    print(f"{pre}{node.name}")

Verify before relying

  • Whether graphviz must be installed separately for visualization features to work
  • Performance characteristics with large or deeply nested trees
  • Thread safety of tree operations

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release <4.0,>=3.9.2
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 493 days since the last release
Last repo commit
First released
Downloads10,482,845 / month, #1,450 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Evidence: anytree-2.13.0-py3-none-any.whl

Tags

Capabilities
tree data structure pythonnode tree librarytree traversal renderinghierarchical data structuretree visualization exportparent child relationshipstree manipulation library
Topics
data-structurestree-algorithmsgraph-visualization
PyPI keywords
treetree datatreelibtree walktree structure

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 › “tree traversal rendering”

  • anytreeProvides a lightweight Python library for creating, manipulating, and…
  • treelibProvides a simple tree data structure implementation for Python,…
  • scantreeRecursively scans directories with flexible filtering, wildcard…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also treelib · django-tree-queries · red-black-tree-mod · astor · nutree · bigtree · pydotplus · pyproj