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

1.0.3

Download files

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

Source Distribution

scmrepo-1.0.3.tar.gz (70.2 kB view details)

Uploaded Source

Built Distribution

scmrepo-1.0.3-py3-none-any.whl (54.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for scmrepo-1.0.3.tar.gz
Algorithm Hash digest
SHA256 70e65e3d614040e6698c1a2c876a82ea1b2b6b85cb4e0a65e5b8c19320f3597d
MD5 ecf43a11b28473fcea9900bbcfa14849
BLAKE2b-256 4f88e72784ec9559927e405bd946b7564583973ac258aa39ae327e362b5927a2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for scmrepo-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 95a9f4da2f9bc4a1604a01b5d73c4d76432ceff17440ff5e70cfd5d53ae6c47b
MD5 386b4aea27483f5e708cd1854892bb61
BLAKE2b-256 ea18dab7b60c171b81e0c83cc56594e35319270c8f8b397de7b7c915fe90417a

See more details on using hashes here.

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