Bill Li
02/22/2024, 3:35 PMIdan Novogroder
02/22/2024, 3:55 PMfrom lakefs_client import LakeFSClient
from lakefs_client.models import CommitCreation
# Initialize the lakeFS client
client = LakeFSClient(
configuration={
"host": "<http://lakefs.example.com/api/v1|http://lakefs.example.com/api/v1>",
"access_key": "YOUR_ACCESS_KEY",
"secret_key": "YOUR_SECRET_KEY"
}
)
# Specify the repository and branch you've been working on
repository_name = 'your-repository'
branch_name = 'your-branch'
# Create a commit with the changes
commit_response = client.commits.commit(
repository=repository_name,
branch=branch_name,
commit_creation=CommitCreation(
message="Describe the changes you made",
metadata={"key": "value"} # Optional additional metadata about the commit
)
)
Bill Li
02/22/2024, 4:10 PMIdan Novogroder
02/22/2024, 5:22 PM