SCM wrapper and fsspec filesystem for Git for use in DVC
Project description
SCM wrapper and fsspec filesystem for Git for use in DVC.
Features
Works with multiple backends: pygit2, dulwich and gitpython.
Provides fsspec filesystem over Git: GitFileSystem.
See fsspec docs for full list of available fs methods.
Requirements
Installation
You can install scmrepo via pip from PyPI:
$ pip install scmrepo
Usage
Git File System
scmrepo provides fsspec based gitfs that provides fs-like API for your git repositories without having to git checkout them first. For example:
from scmrepo.fs import GitFileSystem
fs = GitFileSystem("path/to/my/repo", rev="mybranch")
for root, dnames, fnames in fs.walk("path/in/repo"):
for dname in dnames:
print(fs.path.join(root, dname))
for fname in fnames:
print(fs.path.join(root, fname))
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the Apache 2.0 license, scmrepo is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scmrepo-0.2.1.tar.gz
.
File metadata
- Download URL: scmrepo-0.2.1.tar.gz
- Upload date:
- Size: 69.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99d1f7aa30ec4d895c21f7662b457fdedeba185af1bbc1b1008beff8da9a57bc |
|
MD5 | 82ecdf49dc204cd1723ed85a2ae5ce09 |
|
BLAKE2b-256 | 46ce64361c3d2e47d62d736e0fd61bcb0fcde7a05cc2079dded9d7c396e3d6e4 |
File details
Details for the file scmrepo-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: scmrepo-0.2.1-py3-none-any.whl
- Upload date:
- Size: 54.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d885f23649c416c8251f9cd5cd3bb4d85dcd737e4471dfec1050ce99f9957eb |
|
MD5 | 2c23bd09dbb234e97e8e621cecdecd3d |
|
BLAKE2b-256 | ed57bbb3414caa5fda4085bf9e56629575d91a5225a51cb58948b84974f4ebd0 |