Git Me The URL is a Python library and command-line tool (CLI) designed to generate sharable links to your Git source code. It currently supports popular Git hosting platforms such as GitHub, GitLab, and Bitbucket. The project, currently at version 2.2.0, maintains an active development status with releases typically focusing on dependency updates, minor enhancements, or internal improvements, including a significant architectural rewrite in version 2.0.0.
Install & Compatibility
Where this runs
tested against v2.2.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.255s · 20MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 1.8s · import 0.231s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
The primary class for generating URLs.
from gitmetheurl import GitMeTheURL
This quickstart demonstrates how to initialize the `GitMeTheURL` object and generate a shareable URL for a file within a local Git repository. The library automatically detects the repository and its remote origin.
import os
from gitmetheurl import GitMeTheURL
# Ensure you are running this code within a local Git repository
# Or provide a specific path to a Git repository
# For demonstration, we assume a file 'my_file.txt' exists in the current repo
gmtu = GitMeTheURL()
# Get a shareable URL for a specific file in the current Git repository
# Replace 'my_file.txt' with an actual file path in your repository
# Example: If running from the root of a repo, use 'README.md'
try:
url = gmtu.get_source_url('README.md')
print(f"Shareable URL for README.md: {url}")
except Exception as e:
print(f"Error generating URL: {e}")
print("Please ensure you are in a Git repository and the file path is correct.")
git-me-the-url --version
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.