--- id: giturlparse version: "0.15.0" license: Apache v2 license_treatment: permissive maintenance: active --- # giturlparse — A Git URL parsing module (supports parsing and rewriting) License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install giturlparse uv add giturlparse poetry add giturlparse ## Description =========== 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 ``:@``... ## AI interpretation — verify before relying 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. 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. [View on SkillFed](https://skillfed.io/packages/giturlparse) · [View on PyPI](https://pypi.org/project/giturlparse/)