$npx skillfedfor your agent

scantree

Flexible recursive directory iterator: scandir meets glob("**", recursive=True)

Worth itPyPI UtilitiesReleased Aug 202413.3M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — scantree-0.0.4-py3-none-any.whl
v0.0.4 · released 2024-08-03 · Python >=3.8 · 2 runtime deps: attrs, pathspec

Yes. scantree is actively maintained, has no known vulnerabilities, minimal dependencies, and solves a real problem—flexible directory iteration with symlink safety and in-memory caching. Use it when you need pattern-based directory filtering or repeated tree access; skip it if you only need a single pass over the filesystem.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction: pure Python wheel with only two lightweight runtime dependencies (attrs and pathspec).
  • Active maintenance with last commit on 2026-04-13 and latest release on 2024-08-03.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing unrestricted use, modification, and distribution with minimal legal constraints.

last release 2024-08-03 (741 days) · last repo commit 2026-04-13 · 16 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 13,323,146 downloads/mo, #1,286 on PyPI

Verify before relying

from scantree import scantree, RecursionFilter

tree = scantree('/path/to/dir', RecursionFilter(match=['*.txt']))
print([path.relative for path in tree.filepaths()])
  • Performance characteristics when scanning very large directory trees or handling thousands of files
  • Memory overhead of the in-memory tree representation compared to streaming alternatives
Same gist for agents: .md · .json

What it is and what it does

scantree is a recursive directory scanner that combines the functionality of os.scandir with glob-style pattern matching. It builds an in-memory representation of a file tree, allowing repeated access without re-scanning the filesystem. The library extends the standard os.DirEntry interface with additional path information (real paths, paths relative to the recursion root) and includes built-in detection and handling of cyclic symlinks.

The package is typically used when you need flexible filtering of directory contents—such as matching files by wildcard patterns or custom predicates—while also needing efficient access to file metadata or the ability to traverse and aggregate information across the tree structure. It handles symlinks gracefully, distinguishing between regular symlinks and cycles that would otherwise cause infinite recursion.

Use it for

  • Find all files matching a pattern (e.g., '*.txt') across nested directories with relative and absolute path access
  • Build an in-memory representation of a directory tree for repeated queries without re-scanning the filesystem
  • Detect and safely handle cyclic symlinks during recursive directory traversal
  • Aggregate statistics or metadata across a file tree using the apply() method with custom file and directory handlers
  • Compare directory structures before and after filesystem operations using tree equality checks

Worth the install?

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

Worth it

Yes.

scantree is actively maintained, has no known vulnerabilities, minimal dependencies, and solves a real problem—flexible directory iteration with symlink safety and in-memory caching. Use it when you need pattern-based directory filtering or repeated tree access; skip it if you only need a single pass over the filesystem.

Install

scantree on PyPI

Before you install

Low friction: pure Python wheel with only two lightweight runtime dependencies (attrs and pathspec). Active maintenance with last commit on 2026-04-13 and latest release on 2024-08-03.

License in practice

MIT license is permissive, allowing unrestricted use, modification, and distribution with minimal legal constraints.

Quickstart

from scantree import scantree, RecursionFilter

tree = scantree('/path/to/dir', RecursionFilter(match=['*.txt']))
print([path.relative for path in tree.filepaths()])

Verify before relying

  • Performance characteristics when scanning very large directory trees or handling thousands of files
  • Memory overhead of the in-memory tree representation compared to streaming alternatives

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
attrspathspec
MaintenanceActively maintained 741 days since the last release
Last repo commit
First released
Downloads13,323,146 / month, #1,286 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: scantree-0.0.4-py3-none-any.whl

Tags

Capabilities
recursive directory iteratordirectory tree scanningglob with filteringwildcard path matchingsymlink detectionfile tree representationdirectory traversal
Topics
filesystemdirectory-scanning

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 › “recursive directory iterator”

  • scantreeRecursively scans directories with flexible filtering, wildcard…
  • rignoreProvides fast directory traversal with support for .gitignore rules…
  • asyncinotifyProvides async and sync Python bindings to Linux inotify for…

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

More Utilities 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
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / 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
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also ignore-python · scandir · wcmatch · glob2 · pathmagic · globmatch · colcon-recursive-crawl · xdg-base-dirs · pathtools · path.py