scmrepo
scmrepo
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 scmrepouv
uv add scmrepopoetry
poetry add scmrepoInstalling 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
dulwichDulwich provides pure Python access to Git…
unclear · top 1,000 on PyPI
gdrive-fsspecProvides a fsspec-compatible filesystem…
permissive · top 15,000 on PyPI
dvc-objectsProvides filesystem and object-database…
permissive · top 5,000 on PyPI
sshfsProvides an fsspec-compatible filesystem…
permissive · top 5,000 on PyPI
morefsmorefs provides fsspec-based filesystem…
permissive · top 15,000 on PyPI
fsspecfsspec provides a unified filesystem interface…
unclear · top 100 on PyPI
pygit2pygit2 provides Python bindings to libgit2,…
copyleft · top 5,000 on PyPI
gitdb2Provides low-level read and write access to…
unclear · top 15,000 on PyPI
gitdbGitDB provides low-level read and write access…
permissive · top 1,000 on PyPI
GitPythonGitPython provides high-level and low-level…
permissive · top 1,000 on PyPI