Registry / devops / git-me-the-url

git-me-the-url

JSON →
library2.2.0pypypi✓ verified 35d 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.

devops
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.

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
Debug
Known footguns
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.
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+).
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.
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.

Agent activity
14 hits · last 30 days
gptbot
4
ahrefsbot
4
dotbot
2
script
1
bytedance
1
Resources