skillfed

scmrepo

scmrepo

scmrepo v3.6.2 2.0M downloads/30d#3,341 on PyPI26
Permissive license Apache-2.0 Active released

What it is and what it does

scmrepo is a wrapper around Git that exposes repositories as an fsspec filesystem, letting you treat Git revisions like mounted file systems. Instead of checking out a branch or commit to read its files, you instantiate a GitFileSystem pointing to a repo and revision, then use standard filesystem operations (walk, open, listdir) to access files directly from Git's object store. It abstracts over three different Git backends—pygit2, dulwich, and gitpython—so you can choose which one fits your environment.

The package is designed for use in data pipelines and version-control-aware tools (notably DVC) where you need to read versioned data without the I/O cost of a full checkout. Its ten runtime dependencies include fsspec for the filesystem abstraction, tqdm for progress reporting, and the three Git backends plus async utilities (aiohttp-retry, asyncssh) for flexible I/O patterns.

Use it for:

  • Read data files from a specific Git commit or branch without checking out the working tree.
  • Iterate over directory structures in versioned repositories as part of a data pipeline.
  • Abstract Git access in tools that need to work with multiple Git implementations transparently.
  • Access historical file versions programmatically for auditing or reproducibility.
  • Build version-aware file systems for machine-learning workflows that track data lineage.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

scmrepo provides an fsspec-based filesystem interface to Git repositories, allowing you to read files from any Git revision without checking them out, and abstracts over multiple Git backends (pygit2, dulwich, gitpython).

Yes, if you need to read files from Git revisions without checking them out or if you're building tools that abstract over multiple Git backends. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. Not necessary if you only work with checked-out repositories or have no need for Git-backed filesystem semantics.

Install

scmrepo on PyPI

pip

pip install scmrepo

uv

uv add scmrepo

poetry

poetry add scmrepo

Installing scmrepo

Before you install

Low install friction; pure Python wheel with no compiled dependencies. Actively maintained with a recent commit on 2026-08-10 and support across Python 3.9 through 3.14.

License in practice

Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions; you must include a copy of the license and note any modifications.

Quickstart

pip install scmrepo

from scmrepo.fs import GitFileSystem

fs = GitFileSystem("path/to/my/repo", rev="mybranch")
for root, dnames, fnames in fs.walk("path/in/repo"):
    for fname in fnames:
        print(fs.path.join(root, fname))

Verify before relying

  • Whether all three Git backends (pygit2, dulwich, gitpython) are equally stable or if one is recommended as primary.
  • Performance characteristics when working with large repositories or deeply nested directory trees.
  • Whether async operations via aiohttp-retry are automatic or require explicit opt-in.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 10 — gitpython, dulwich, pygit2, pygtrie, fsspec, pathspec, asyncssh, funcy, aiohttp-retry, tqdm
Maintenance actively maintained — 136 days since the last release
Last repo commit
First released
Downloads 2,048,480/month — #3,341 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: scmrepo-3.6.2-py3-none-any.whl

Development Status :: 4 - BetaProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

git filesystem fsspecread git files without checkoutgit repository abstraction layermultiple git backend wrappergit revision file accessscm repository interfacegit fsspec integration
git-abstractionfsspec-backendversion-control

More Software Development packages