--- id: python-hglib version: "2.6.2" license: MIT license_treatment: permissive maintenance: abandoned --- # python-hglib — Mercurial Python library License: permissive · Maintenance: abandoned · Downloads: 76.9K/mo ## What it is and what it does python-hglib is a Python library that wraps Mercurial's command server to provide a programmatic interface to hg operations. Instead of shelling out to the hg command-line tool, it communicates directly with Mercurial's server mode, which the library describes as offering a fast and convenient way to interact with repositories from Python code. The package is designed for developers who need to automate or script Mercurial workflows—for example, querying repository state, running commits, or managing branches programmatically. However, the package has been abandoned since its last release on 2020-11-17 and classifiers only list Python up to 3.4, making it a legacy tool unsuitable for new projects unless you are maintaining existing Mercurial-based infrastructure. Use it for: - Automating Mercurial repository operations in build or deployment scripts that cannot use the command-line hg tool directly. - Writing tools that need to query Mercurial repository metadata or history programmatically. - Integrating Mercurial version control into Python applications that manage or monitor multiple repositories. - Legacy system maintenance where existing Python code depends on hglib for Mercurial interaction. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. python-hglib provides a Python interface to Mercurial version control by communicating with Mercurial's command server, enabling programmatic access to hg operations. No, unless you are maintaining legacy code already using this package. The project is abandoned (last release 2020-11-17), classifiers only list Python up to 3.4, and high install friction suggests unresolved system dependencies. For new Mercurial automation, consider alternatives or direct command-line invocation. ## Install pip install python-hglib uv add python-hglib poetry add python-hglib ## Installing python-hglib Before you install: Installation friction is high and maintenance is abandoned—the package has not been updated since 2020-11-17. No recent commits or repository activity are available. Caution is warranted for new projects. License in practice: Licensed under MIT (permissive), so you may use, modify, and distribute the package freely with minimal restrictions. Quickstart: pip install python-hglib from hglib.client import hg repo = hg.open('/path/to/repo') log = repo.log() repo.close() Requires Mercurial to be installed and the hg command server to be available on the system; high install friction suggests potential compiled dependencies or system-level configuration. Verify before relying: - Whether the package works reliably with modern Python versions beyond 3.4, given its age and lack of maintenance. - Current compatibility with recent Mercurial releases and whether the command server protocol has changed. - Whether high install friction is due to compiled dependencies or other system-level requirements. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 76.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags mercurial python interface, hg command server library, version control automation, mercurial scripting, hglib python bindings, mercurial, version-control, abandoned [View on SkillFed](https://skillfed.io/packages/python-hglib) · [View on PyPI](https://pypi.org/project/python-hglib/)