skillfed

harborapi

Async Harbor API v2.0 client

harborapi v0.26.2 82.2K downloads/30d#14,175 on PyPI41
Permissive license DORMANT released

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 on this page — 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

harborapi on PyPI

pip

pip install harborapi

uv

uv add harborapi

poetry

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 the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 4 — backoff, httpx, pydantic, typing-extensions
Maintenance dormant — 570 days since the last release
Last repo commit
First released
Downloads 82,247/month — #14,175 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: harborapi-0.26.2-py3-none-any.whl

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: InternetTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

harbor registry api clientasync container registry clientharbor rest api pythoncontainer image management apiharbor project managementasync docker registry clientharbor artifact management
container-registryasync-clientharbor

More Libraries packages