gitsnapshot
A simple library to load snapshots of git repository.
Usage
To load git repository call load_repo as follows:
from gitsnapshot import load_repo
load_repo('~/target/directory', 'git@github.com/test/repo')
This code creates folder ~/target/directory if this folder doesn't exists, and then
clone shallow copy of repository git@github.com/test/repo.
By default this function loads current master branch.
To load another branch (i.e. develop) pass branch name in branch parameter:
from gitsnapshot import load_repo
load_repo('~/target/directory', 'git@github.com/test/repo', branch='develop')
Also you can load snapshot by tag:
from gitsnapshot import load_repo
load_repo('~/target/directory', 'git@github.com/test/repo', tag='v0.1.2')
Or by commit hash:
from gitsnapshot import load_repo
load_repo('~/target/directory', 'git@github.com/test/repo', commit='abcdef')
Errors
load_repo function return optional string with error description.
If load_repo returned None then no errors was happened.
Reusing of directory
If you try to load repository snapshot into existing directory with another snapshot
of the same repository, load_repo will return error.
To avoid this behavior pass use_existing=True as argument.
from gitsnapshot import load_repo
load_repo('~/target/directory', 'git@github.com/test/repo', use_existing=True)
In this case load_repo will load repository index and will checkout to specified
branch, tag or commit.
Metadata
Release files for gitsnapshot 0.1.1.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gitsnapshot-0.1.1.post1.tar.gz | 3.3 kB | Without provenance | Details for gitsnapshot-0.1.1.post1.tar.gz |
Release files / gitsnapshot-0.1.1.post1.tar.gz
| Download URL | gitsnapshot-0.1.1.post1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc9f20fdb4ba48db189047a74c9553e4749e674fac3a0314ab0282d3dc8365e5
|
|
BLAKE2b-256 checksum How to use checksums |
b1fc0b567c06faf315c1866e815fa46a75c2476bcfd676defa7d5c45e438b890
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
|
Security for gitsnapshot 0.1.1.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.