Retrieve all commits from an AWS CodeCommit repository in bulk
Project description
CodeCommit-ListCommits
日本語はこちら: README_JP.md
CodeCommit-ListCommits is a Python library designed to facilitate the retrieval of commit history from AWS CodeCommit repositories using the Dulwich library. Unlike boto3, which does not allow for the bulk retrieval of all commits from a repository, this library enables you to clone a repository and extract all commit information in bulk, making it easier to analyze commit histories efficiently.
Features
- Bulk Commit Retrieval: Retrieve all commits from a repository in bulk, making it easier and more efficient to analyze the entire commit history at once.
- Branch-Specific Retrieval: Retrieve commits from either the default or a specified branch.
- Secure Repository Cloning: Clone AWS CodeCommit repositories securely using HTTPS credentials.
- Automatic Cleanup: Automatically remove the cloned repository after the process completes, ensuring no leftover files.
Installation
pip install CodeCommitListCommits
Simple Demo
from CodeCommitListCommits import CodeCommitListCommits
USERNAME = "xxxxxxx"
PASSWORD = "xxxxxxx"
region = "ap-northeast-1"
repository_name = "repository_name"
# Retrieve commits from the default branch
client = CodeCommitListCommits(USERNAME, PASSWORD, region)
commits_default = client.list_commits(repository_name)
print(commits_default)
# Retrieve commits from a specific branch (e.g., "branch1")
commits_branch1 = client.list_commits(repository_name, "branch1")
print(commits_branch1)
Generate HTTPS Git Credentials for CodeCommit
- Log in to the AWS Management Console.
- Go to Security credentials, and select AWS CodeCommit credentials.
- Click on Generate credentials under the HTTPS GIt credentials for AWS CodeCommit section to create a username and password.
- Save the generated username and password. These will be used to authenticate when clone the repository.
Requirements
dulwich
library- AWS CodeCommit credentials
Project details
Release history Release notifications | RSS feed
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 codecommit_listcommits-1.0.2.tar.gz
.
File metadata
- Download URL: codecommit_listcommits-1.0.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d05621ec93eceb887a4d665277136634a449cfc5badbea0b7b8c6a8af169f40c |
|
MD5 | 79dfce38e4ab8dfd6157595377f9bbc1 |
|
BLAKE2b-256 | 9b5c426ac96818563f9f3edf1059370a274fb946405ae48153624d8e9ff8ef3f |
File details
Details for the file CodeCommit_ListCommits-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: CodeCommit_ListCommits-1.0.2-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78fdff6db45261af65ae81837d851e86ab1c9ee61b10ffe5078cc2f2c6e0bb26 |
|
MD5 | bafc68981f043af47286943410a93342 |
|
BLAKE2b-256 | f3edb24d989be674746ac53c0359075c699c70d0367db2508d9cd56810d334f0 |