Skip to main content

Retrieve all commits from an AWS CodeCommit repository in bulk

Project description

pypl Welcome PR MIT license

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

  1. Log in to the AWS Management Console.
  2. Go to Security credentials, and select AWS CodeCommit credentials.
  3. Click on Generate credentials under the HTTPS GIt credentials for AWS CodeCommit section to create a username and password.
  4. Save the generated username and password. These will be used to authenticate when clone the repository.

Requirements

  • dulwich library
  • AWS CodeCommit credentials

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

codecommit_listcommits-1.0.2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

CodeCommit_ListCommits-1.0.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file codecommit_listcommits-1.0.2.tar.gz.

File metadata

File hashes

Hashes for codecommit_listcommits-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d05621ec93eceb887a4d665277136634a449cfc5badbea0b7b8c6a8af169f40c
MD5 79dfce38e4ab8dfd6157595377f9bbc1
BLAKE2b-256 9b5c426ac96818563f9f3edf1059370a274fb946405ae48153624d8e9ff8ef3f

See more details on using hashes here.

File details

Details for the file CodeCommit_ListCommits-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for CodeCommit_ListCommits-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 78fdff6db45261af65ae81837d851e86ab1c9ee61b10ffe5078cc2f2c6e0bb26
MD5 bafc68981f043af47286943410a93342
BLAKE2b-256 f3edb24d989be674746ac53c0359075c699c70d0367db2508d9cd56810d334f0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page