Simple library to commit lfs files to Github repos
Project description
githublfs is a Python library currently exposing a single method to upload and commit a file to a Github repository using git LFS.
See https://git-lfs.github.com/
Installation
pip install githublfs
Usage
>>> from githublfs import commit_lfs_file >>> commit_lfs_file(repo="AnesFoufa/githublfs", token="gh_token_with_repo_scope", branch="main", path="assets/logo.jpg", content=b"binary file content", message="my commit message")
To authenticate, an access token with repo scope is neede. See: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
Dependencies
python = “^3.7”
PyGithub = “^1.55”
requests = “^2.28.1”
Implementation details
This library uses LFS’ Basic Transfer API. See https://github.com/git-lfs/git-lfs/blob/main/docs/api/basic-transfers.md
Production warning
This library is still experimental. If you use it in production, please pin the exact version in your requirements, including the minor number.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file githublfs-0.1.3.tar.gz
.
File metadata
- Download URL: githublfs-0.1.3.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6227bb4cc6230aca62274b8d1c2543e8c9cd97cd02b1f1579c13ffe21a9b1c89 |
|
MD5 | 79e6d2b68d53e2c6ba76d9738517a9cf |
|
BLAKE2b-256 | 328b60765845fbecb05fbf207dd607c23d437ddf89dfe2bbbb070b71e78082b4 |
File details
Details for the file githublfs-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: githublfs-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01f7d6f92a6933d6923bfbe9334a159e1b53968047918625b9246c463267ea7c |
|
MD5 | b339cd553f5a962076bbdc7248a9b389 |
|
BLAKE2b-256 | b18211f5ec75c5d3d2a637c0109050f0f0bd8011d1ce44e5f86ff8033f53ff4c |