Skip to main content

SCM wrapper and fsspec filesystem for Git for use in DVC

Project description

PyPI Status Python Version License

Tests Codecov pre-commit Black

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

This version

0.1.6

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scmrepo-0.1.6.tar.gz (63.1 kB view details)

Uploaded Source

Built Distribution

scmrepo-0.1.6-py3-none-any.whl (48.6 kB view details)

Uploaded Python 3

File details

Details for the file scmrepo-0.1.6.tar.gz.

File metadata

  • Download URL: scmrepo-0.1.6.tar.gz
  • Upload date:
  • Size: 63.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for scmrepo-0.1.6.tar.gz
Algorithm Hash digest
SHA256 ed083676c3da26eb98d9fe43b7f00814094109be1c51c023143070187eebf4d6
MD5 f5dc02621419917baac30f80d5924367
BLAKE2b-256 e8675ff9bed103c78a1f408f9e3aee69718545cff914a70091dc36107c988c7a

See more details on using hashes here.

Provenance

File details

Details for the file scmrepo-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: scmrepo-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 48.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for scmrepo-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d714a20a3189c8436bb8e8601b0141ac182dc1ea3f0e6ea5ac31ab873ecdeb4f
MD5 1548d9ed2ddc50631f1f0ff1559bdfbf
BLAKE2b-256 a14971cf78edd3cdf948d28e046e176ed4b15a1f82a84308e7ec4d885b388d92

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page