Skip to main content

Detect duplicate and similar GitHub repositories

Project description

🔍 Repo Duplicate Detector

A powerful Python package to detect duplicate and similar repositories on GitHub. Analyze ecosystem fragmentation, find abandoned forks, and identify alternative implementations.

Python 3.8+ License: MIT GitHub


🎯 Features

Find Similar Repositories - Detect repositories solving similar problems ✅ Duplicate Detection - Identify nearly identical repositories ✅ Ecosystem Analysis - Analyze topic fragmentation across GitHub ✅ Fork Detection - Find abandoned or active forks ✅ Intelligent Matching - Multi-factor similarity algorithm ✅ Rate Limit Handling - Built-in rate limit management ✅ Semantic Analysis - Optional deep learning-based description matching ✅ Caching - Efficient caching to reduce API calls ✅ High Performance - Concurrent API requests with retry logic ✅ Security - Input validation and secure token handling


🚀 Quick Start

Installation

pip install repo-duplicate-detector

Basic Usage

from repo_duplicate_detector import RepoMatcher

# Initialize
matcher = RepoMatcher(github_token="your_github_token")

# Find similar repositories
similar_repos = matcher.find_similar_repos("facebook/react")

for match in similar_repos:
    print(f"{match.repo2['full_name']}: {match.similarity.overall_score:.2%}")

Using GitHub Token

Set your GitHub token as environment variable:

export GITHUB_TOKEN="ghp_your_token_here"

Or pass it directly:

from repo_duplicate_detector import RepoMatcher
from repo_duplicate_detector.config import Config

config = Config(github_token="ghp_your_token")
matcher = RepoMatcher(config=config)

📚 Documentation

RepoMatcher

Main class for finding duplicates and analyzing repositories.

Methods

find_similar_repos(repo, language=None, threshold=None, max_results=None)

Find repositories similar to a given repository.

matches = matcher.find_similar_repos(
    repo="facebook/react",
    language="javascript",
    threshold=0.7,
    max_results=20
)

for match in matches:
    print(match)
    print(match.to_dict())

find_duplicates_in_list(repos, threshold=None)

Find duplicates within a list of repositories.

duplicates = matcher.find_duplicates_in_list
Digital Helpers
  • Github
  • CoPilot
  • ChatGPT
  • Visual Studio
  • Github Dev
  • Claude

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

repo_duplicate_detector-0.1.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

repo_duplicate_detector-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file repo_duplicate_detector-0.1.0.tar.gz.

File metadata

  • Download URL: repo_duplicate_detector-0.1.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for repo_duplicate_detector-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c1abe4c8735c6293b9157ebaa6a4165ca2daf4be68480aca73afafa9abed9380
MD5 aded34cd00e072b76bfc25f04790a295
BLAKE2b-256 1615c12843470638fbd2adc973766abba8eba32f15401a1b56b83974204b4b59

See more details on using hashes here.

File details

Details for the file repo_duplicate_detector-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for repo_duplicate_detector-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50fb0c673bffd98d39f69e28e997b4eb1302c37060abf24b0c71d17c1d69b014
MD5 1114b775a226bede7e1935228613a8c2
BLAKE2b-256 e6bb9b7c7d63859dd8d9c6ed7f425d39554f984f0b93421ff0674c2b1dd5288d

See more details on using hashes here.

Supported by

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