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

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.17.tar.gz (65.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scmrepo-0.1.17-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for scmrepo-0.1.17.tar.gz
Algorithm Hash digest
SHA256 e98a8d22ddc8982878ea41c6262ca847033d0f45fd9d9086a68143bcadd0674c
MD5 4af5ead5ddbbc03c73ac93de908c3d23
BLAKE2b-256 6805b7015016a62c1fdc7df4c99fda23a60516ff707673ce037691121ddd8bf9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for scmrepo-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 32c4505d9df836387d7c15f95ad8053a42ef924e5a7ce5982516ca457e03ac0f
MD5 40cf74b00b1254291b55642abc1618a1
BLAKE2b-256 926844689ad34e281ea7c575760d265d6adcc1a6426c61efaf186ec70b92695a

See more details on using hashes here.

Supported by

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