Registry / devops / git-me-the-url

git-me-the-url

JSON →
library2.2.0pypypi✓ verified 86d ago

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.

pip install git-me-the-url
INSTALL
IMPORT
SIG · GIT-ME-THE-URL
G
git-me-the-url
devopspythonv2.2.0
Install
1.8s avg
Import
243ms
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.255s · 20MB
glibc
py 3.103.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.

GitMeTheURL
from gitmetheurl import GitMeTheURL
The primary class for generating URLs.

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
Debug
Known issues
breakingVersion 2.0.0 introduced a significant internal rewrite of the URL translator implementations. While the public API for basic usage (e.g., `get_source_url`) might remain largely compatible, any custom URL generators or plugins developed against the older internal structure may break and require updates.
fix
Review the 'Rewrote implementation of translators' section in the release notes for v2.0.0 and update any custom URL generation logic or plugins accordingly.
affects: <2.0.0
deprecatedVersions prior to 2.1.0 had a dependency on `pkg_resources`. This package is deprecated and has been removed in Python 3.12, which could lead to `UserWarning: pkg_resources is deprecated` messages or import errors in environments with newer Python versions or `setuptools` versions (e.g., setuptools 82+).
fix
Upgrade to `git-me-the-url` version 2.1.0 or higher, which explicitly removed the `pkg_resources` dependency. Ensure your `setuptools` version is compatible if you cannot upgrade the library.
affects: <2.1.0
gotchaThe library depends on the `git` executable being installed on the system and discoverable in the system's PATH. Without a functional `git` installation, `git-me-the-url` will not be able to interact with repositories, potentially leading to errors originating from its `GitPython` dependency.
fix
Install Git on your operating system and ensure it's added to your system's PATH environment variable. Verify installation with `git --version` in your terminal.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'gitmetheurl'
The `git-me-the-url` package is not installed, or the import statement is incorrect.
fix
Ensure the package is installed: `pip install git-me-the-url`. Check that the import is `from gitmetheurl import GitMeTheURL`.
git.exc.InvalidGitRepositoryError: 'path/to/your/dir' does not seem to be a git repository
The command or Python script is being executed in a directory that is not part of a Git repository, or the specified path is not a Git repository.
fix
Navigate to the root of your Git repository before running the command, or ensure that the path passed to `get_source_url` is within a valid Git repository.
UserWarning: pkg_resources is deprecated as an API.
This warning occurs in older versions of `git-me-the-url` (prior to 2.1.0) when run with newer Python or `setuptools` versions. `pkg_resources` was removed in Python 3.12 and recent `setuptools` releases.
fix
Upgrade `git-me-the-url` to version 2.1.0 or newer: `pip install --upgrade git-me-the-url`. If unable to upgrade, you might need to pin an older `setuptools` version, though this is not recommended.
Upgrade
Version history
2.2.0latest on PyPI · released Nov 21, 2025
Audit
Dependencies
GitPythonrequiredThe library relies on GitPython to interact with local Git repositories. GitPython, in turn, requires the 'git' executable to be installed and accessible in the system's PATH.
Agent activity
9 hits · last 30 days
node
8
Resources
git-me-the-url — pip install git-me-the-url · libregistry