Giter Site home page Giter Site logo

sisp / scmrepo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iterative/scmrepo

0.0 1.0 0.0 755 KB

SCM wrapper and fsspec filesystem for Git for use in DVC.

Home Page: https://dvc.org

License: Apache License 2.0

Shell 0.01% Python 99.99%

scmrepo's Introduction

scmrepo

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.