Skip to main content

Python Github LFS client

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 needed. See: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

Dependencies

  • Python >= 3.8

  • 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.

License

This project is distributed under the MIT license. See the LICENSE file for details.

Metadata

Release files for githublfs 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for githublfs 0.2.1
File Size Uploaded Provenance Actions
githublfs-0.2.1.tar.gz 3.8 kB Without provenance Details for githublfs-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for githublfs 0.2.1
File Interpreter ABI Platform Actions
githublfs-0.2.1-py3-none-any.whl Python 3 none any Details for githublfs-0.2.1-py3-none-any.whl

Total release size: 8.3 kB

Release files / githublfs-0.2.1.tar.gz

Download URL githublfs-0.2.1.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
071184711eb121a6122530ffb8f67a36c6a2e6f3b1552206109c15438c881360
BLAKE2b-256 checksum
How to use checksums
0360d42018e0567cc0ff0b3ae0b51697b05b6b63d191e52845f19b2eda2befdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.27

Release files / githublfs-0.2.1-py3-none-any.whl

Download URL githublfs-0.2.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20242f3a0cc3e84b84038ad47f0b22fa90fcbb0716aa4377b4b35b8c0d45c125
BLAKE2b-256 checksum
How to use checksums
17c97cec43a5ea0c7350e288328f41b0c7a01158ad7905967421899152f9fc91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.27

Security for githublfs 0.2.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page