Name | lock-file-smith JSON |
Version |
0.1.0
JSON |
| download |
home_page | https://github.com/hueyyeng/lock-file-smith |
Summary | Simple wrapper for Git LFS (Large File Storage) commands. |
upload_time | 2023-09-14 12:17:19 |
maintainer | Huey Yeng |
docs_url | None |
author | Huey Yeng |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2023 Huey Yeng Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
python
library
git
lfs
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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
```python
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
[https://git-lfs.com/](https://git-lfs.com/)
[https://www.atlassian.com/git/tutorials/git-lfs](https://www.atlassian.com/git/tutorials/git-lfs)
Raw data
{
"_id": null,
"home_page": "https://github.com/hueyyeng/lock-file-smith",
"name": "lock-file-smith",
"maintainer": "Huey Yeng",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Huey Yeng <huey.yeng.mmu@gmail.com>",
"keywords": "python,library,git,lfs",
"author": "Huey Yeng",
"author_email": "Huey Yeng <huey.yeng.mmu@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/72/77/f690114f4a795a8a90d1af194b01738ace68157767461375fa23d1161abd/lock-file-smith-0.1.0.tar.gz",
"platform": null,
"description": "# lock-file-smith\r\n\r\nSimple wrapper for Git LFS (Large File Storage) commands.\r\n\r\n## Quickstart\r\n\r\nAs there is no API for interacting with Git LFS, this wrapper provides function that\r\nyou can use in your Python application for querying, lock/unlock Git LFS files etc.\r\n\r\nThe `LockFile` dataclass stores the name, author and ID of a locked file.\r\n\r\nTake note that the speed of this library depends on Git. This has not been tested on\r\na Git repository with a large number of locked files.\r\n\r\n## Usage\r\n\r\n```python\r\nfrom lockfilesmith.cmds import lock, query\r\n\r\n# Use this to verify if Git/Git LFS is presence\r\nquery.is_git_installed()\r\nquery.verify_git_lfs()\r\n\r\n# Query for locked files.\r\nlocked_files = query.locked_files() # Will return empty list if no locked files \r\n\r\n# Lock a file (ensure the file format is tracked as LFS)\r\nlock.lock_file(\"foo/bar.uasset\") # True\r\n\r\n# Unlock file (you can retrieve the locked object ID using query.locked_files)\r\nbar = query.locked_files()[0] # assume bar.uasset is the only locked file\r\nlock.unlock_file(bar.id)\r\n```\r\n\r\n## Further reading\r\n\r\n[https://git-lfs.com/](https://git-lfs.com/)\r\n\r\n[https://www.atlassian.com/git/tutorials/git-lfs](https://www.atlassian.com/git/tutorials/git-lfs)\r\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Huey Yeng Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Simple wrapper for Git LFS (Large File Storage) commands.",
"version": "0.1.0",
"project_urls": {
"Bug Reports": "https://github.com/hueyyeng/lock-file-smith/issues",
"Homepage": "https://github.com/hueyyeng/lock-file-smith",
"Source": "https://github.com/hueyyeng/lock-file-smith"
},
"split_keywords": [
"python",
"library",
"git",
"lfs"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f7370f6307021aeee4ad25e04c78aa1166a5b9b561c4182206dcec7e6d1225f8",
"md5": "f3c8e5110c4c376ab09b4c320f9061a3",
"sha256": "3fb900532468c50ef4f31405ebceca797e347f1263973f4b6663528cceafe9f3"
},
"downloads": -1,
"filename": "lock_file_smith-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f3c8e5110c4c376ab09b4c320f9061a3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 7251,
"upload_time": "2023-09-14T12:17:17",
"upload_time_iso_8601": "2023-09-14T12:17:17.185894Z",
"url": "https://files.pythonhosted.org/packages/f7/37/0f6307021aeee4ad25e04c78aa1166a5b9b561c4182206dcec7e6d1225f8/lock_file_smith-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7277f690114f4a795a8a90d1af194b01738ace68157767461375fa23d1161abd",
"md5": "66283260ae982fa8f58ce5db243473f7",
"sha256": "facaa56b59f55e01525f5a10d290fea1a06a7c5293cead652a40de4092650a8e"
},
"downloads": -1,
"filename": "lock-file-smith-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "66283260ae982fa8f58ce5db243473f7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 5031,
"upload_time": "2023-09-14T12:17:19",
"upload_time_iso_8601": "2023-09-14T12:17:19.040251Z",
"url": "https://files.pythonhosted.org/packages/72/77/f690114f4a795a8a90d1af194b01738ace68157767461375fa23d1161abd/lock-file-smith-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-14 12:17:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hueyyeng",
"github_project": "lock-file-smith",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "lock-file-smith"
}