Framework: Add and extend URL parsers - libvcs.url.base¶

Most readers can use the stock Git, Mercurial, and Subversion parsers. Reach for this lower-level framework when you need a custom URL shape: define a Rule, group rules in a RuleMap, and attach that map to a parser class.

Foundational tools to detect, parse, and validate VCS URLs.

class libvcs.url.base.URLProtocol
¶
class libvcs.url.base.URLProtocol
¶

Bases: Protocol

Common interface for VCS URL Parsers.

class libvcs.url.base.Rule
¶
class libvcs.url.base.Rule
¶

Bases: SkipDefaultFieldsReprMixin

A Rule represents an eligible pattern mapping to URL.

class libvcs.url.base.RuleMap
¶
class libvcs.url.base.RuleMap
¶

Bases: SkipDefaultFieldsReprMixin

Pattern matching and parsing capabilities for URL parsers, e.g. GitURL.