skillfed

giturlparse

A Git URL parsing module (supports parsing and rewriting)

giturlparse Permissive license Apache v2 Active 100 v0.15.0 released

Install

giturlparse on PyPI

pip

pip install giturlparse

uv

uv add giturlparse

poetry

poetry add giturlparse

Package facts

License Apache v2 (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 58 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: giturlparse-0.15.0-py2.py3-none-any.whl

Keywords: giturlparse

Development Status :: 5 - Production/StableFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

About giturlparse

from the package's own PyPI description — quoted content, verbatim

=========== giturlparse ===========

Parse & rewrite git urls (supports GitHub, Bitbucket, FriendCode, Assembla, Gitlab ...)

This is a fork of giturlparse.py with updated parsers.

Original project can be found at https://github.com/FriendCode/giturlparse.py


Installing


::

pip install giturlparse

Examples


Exposed attributes

  • platform: platform codename
  • host: server hostname
  • resource: same as host
  • port: URL port (only if explicitly defined in URL)
  • protocol: URL protocol (git, ssh, http/https)
  • protocols: list of protocols explicitly defined in URL
  • user: repository user
  • owner: repository owner (user or organization)
  • repo: repository name
  • name: same as repo
  • groups: list of groups - gitlab only
  • path: path to file or directory (includes the branch name) - gitlab / github only
  • path_raw: raw path starting from the repo name (might include platform keyword) - gitlab / github only
  • branch: branch name (when parseable) - gitlab / github only
  • username: username from <username>:<access_token>@<url>...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Parses and rewrites Git repository URLs across multiple platforms (GitHub, GitLab, Bitbucket, and others), extracting components like owner, repo name, branch, and protocol while supporting format conversion between SSH, HTTPS, and git protocols.

Installs cleanly with zero runtime dependencies and a pure-Python wheel distribution. Actively maintained with a recent release (58 days old) and steady commit activity.

Licensed under Apache v2 (permissive), allowing commercial and private use with minimal restrictions—suitable for most integration scenarios.

Usage

from giturlparse import parse

url = 'git@github.com:owner/repo.git'
p = parse(url)
print(p.host, p.owner, p.repo)  # github.com, owner, repo
print(p.url2https)  # https://github.com/owner/repo.git

Requires Python 3.8 or later.

Verdict: A lightweight, actively maintained URL parser with no external dependencies, strong platform coverage, and a permissive license. Suitable for CI/CD pipelines, repository management tools, and any system needing to normalize or extract metadata from Git URLs.

Needs verification

  • Whether the package handles edge cases like non-standard ports or custom Git hosting platforms beyond those explicitly listed.
  • Performance characteristics when parsing large batches of URLs or malformed input.
parse git urlsgit repository url parserextract github gitlab bitbucket urlsrewrite git ssh httpsgit url components extractionvalidate git repository urlsconvert git url formats

Similar packages