Harbor client light.
Introduction
Harbor is the enterprise-class registry server for docker distribution.
harbor-py-light is lightweight Harbor client. The supported APIs are list below.
-
Projects APIs
- Get projects
- Create project
- Check project exist
- Get project id from name
- Set project publicity
- Get project access logs
- Get project member
- Get project and user member
- Repositories APIs
-
Others APIs
- Search
- Get statistics
- Get top accessed repositories
- Get logs
- Get systeminfo
- Get systeminfo volumes
- Get configurations
Installation
pip install harbor-py-light
Usage
from harborclient import harborclient
host = "127.0.0.1"
user = "admin"
password = "Harbor12345"
client = harborclient.HarborClient(host, user, password)
client.get_projects()
client.get_users()
client.get_statistics()
client.get_top_accessed_repositories()
client.search("library")
For more usage, please refer to the examples.