urls
URL string parsing functions.
Classes¶
ParsedURL
dataclass
¶
ParsedURL(
protocol: str = "",
username: str = "",
access_token: str = "",
host: str = "",
port: str = "",
full_path: str = "",
owner: str = "",
groups_path: str = "",
repo_name: str = "",
raw_internal_path: str = "",
internal_path: str = "",
checkout: str = "",
dot_git: str = "",
)
Functions¶
parse_git_path
¶
parse_git_path(path: str) -> PathInfo
Parse the path from a git URL into components.
parse_git_url
¶
parse_git_url(git_url: str) -> ParsedURL
Parse a URL string into a URL
object if it is a valid URL.
parse_internal_path
¶
parse_internal_path(path: str) -> Dict[str, str]
Parse the internal path into internal_path and checkout components.
Branches or tags with slashes in them will not be able to be parsed out with blobs.
If the path starts with /-/tree/
, /tree/
, or /commit/
, the remaining are pointers to the entire checkout.
Otherwise, the path may contain the checkout and the path
PARAMETER | DESCRIPTION |
---|---|
path
|
The raw internal path string.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Dict[str, str]
|
A dict with keys |