lock-file-smith
Simple wrapper for Git LFS (Large File Storage) commands.
Quickstart
As there is no API for interacting with Git LFS, this wrapper provides function that you can use in your Python application for querying, lock/unlock Git LFS files etc.
The LockFile dataclass stores the name, author and ID of a locked file.
Take note that the speed of this library depends on Git. This has not been tested on a Git repository with a large number of locked files.
Usage
from lockfilesmith.cmds import lock, query
# Use this to verify if Git/Git LFS is presence
query.is_git_installed()
query.verify_git_lfs()
# Query for locked files.
locked_files = query.locked_files() # Will return empty list if no locked files
# Lock a file (ensure the file format is tracked as LFS)
lock.lock_file("foo/bar.uasset") # True
# Unlock file (you can retrieve the locked object ID using query.locked_files)
bar = query.locked_files()[0] # assume bar.uasset is the only locked file
lock.unlock_file(bar.id)
Further reading
Metadata
Release files for lock-file-smith 0.1.0
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 | |
|---|---|---|---|---|
| lock-file-smith-0.1.0.tar.gz | 5.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lock_file_smith-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.3 kB
Release files / lock-file-smith-0.1.0.tar.gz
| Download URL | lock-file-smith-0.1.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
facaa56b59f55e01525f5a10d290fea1a06a7c5293cead652a40de4092650a8e
|
|
BLAKE2b-256 checksum How to use checksums |
7277f690114f4a795a8a90d1af194b01738ace68157767461375fa23d1161abd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / lock_file_smith-0.1.0-py3-none-any.whl
| Download URL | lock_file_smith-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3fb900532468c50ef4f31405ebceca797e347f1263973f4b6663528cceafe9f3
|
|
BLAKE2b-256 checksum How to use checksums |
f7370f6307021aeee4ad25e04c78aa1166a5b9b561c4182206dcec7e6d1225f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for lock-file-smith 0.1.0
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.