--- id: harborapi version: "0.26.2" license: unclear license_treatment: permissive maintenance: dormant --- # harborapi — Async Harbor API v2.0 client License: permissive · Maintenance: dormant · Downloads: 82.2K/mo ## What it is and what it does harborapi is an async Python client for Harbor, the open-source container registry. It wraps Harbor's REST API v2.0 with full type hints and Pydantic validation, allowing you to programmatically manage projects, artifacts, robots, vulnerability reports, and other registry resources. The library acknowledges that the official Harbor API spec contains errors and inconsistencies; it applies local fixes to make validation usable where the spec and actual API responses diverge. You instantiate a HarborAsyncClient with your Harbor URL and credentials, then call async methods like get_projects(), create_project(), get_artifacts(), and get_artifact_vulnerability_reports(). Built-in retry logic via backoff handles transient failures automatically. Optional Rich support provides pretty-printed output. The library supports Python 3.8–3.12 and is classified as Beta. Use it for: - Automate project and artifact management in Harbor from Python scripts or CI/CD pipelines. - Fetch vulnerability reports for container images and integrate them into security scanning workflows. - Query and manage robot accounts and permissions programmatically for registry access control. - Build monitoring or audit tools that track Harbor projects, repositories, and artifact metadata. - Integrate Harbor operations into larger container orchestration or DevOps automation frameworks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Async Python client for the Harbor container registry REST API v2.0, with full type hints, Pydantic validation, and built-in retry logic. Yes, if you need to automate Harbor registry operations from Python. The library is mature (Beta, since 2022), has no known vulnerabilities, and low install friction. The dormant maintenance status is acceptable for a stable API client—the last release fixed a recent httpx compatibility issue. Verify that its workarounds for Harbor API spec inconsistencies align with your Harbor version before committing to production use. ## Install pip install harborapi uv add harborapi poetry add harborapi ## Installing harborapi Before you install: Low friction: pure Python wheel with four lightweight runtime dependencies (backoff, httpx, pydantic, typing-extensions). Maintenance is dormant—last release 2025-01-21 with a recent fix for httpx>=0.28.0 compatibility, but no active development signals beyond bug fixes. License in practice: MIT license (permissive). No restrictions on commercial or private use; you may modify and redistribute under the same license. Quickstart: pip install harborapi import asyncio from harborapi import HarborAsyncClient async def main(): client = HarborAsyncClient( url="https://demo.goharbor.io/api/v2.0/", username="user", secret="pass" ) projects = await client.get_projects() for p in projects: print(p.name) asyncio.run(main()) Requires Python 3.8+; async/await syntax mandatory; Harbor API endpoint URL and credentials required. Verify before relying: - Whether the library's workarounds for Harbor API spec inconsistencies remain sufficient for current Harbor versions. - Current maintenance commitment and response time for bug reports or compatibility issues. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 82.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags harbor registry api client, async container registry client, harbor rest api python, container image management api, harbor project management, async docker registry client, harbor artifact management, container-registry, async-client, harbor [View on SkillFed](https://skillfed.io/packages/harborapi) · [View on PyPI](https://pypi.org/project/harborapi/)