Skip to content

yangpeng14/harbor_sdk_v2.0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Harbor Python SDK 调用方法

基于 Harbor Version 2.0+ 版本,调用 API 接口查看 Harbor 中projects、repositories、artifacts、tag等。并提供删除方法。

使用举例

import harborclient_modify_v2_0

class GetHarborApi(object):
    def __init__(self, host, user, password, protocol="http"):
        self.host = host
        self.user = user
        self.password = password
        self.protocol = protocol
        self.client = harborclient_modify_v2_0.HarborClient(self.host, self.user, self.password, self.protocol)

    def main(self):
        print(self.client.get_projects())

if __name__ == '__main__':
    host = "harbor.example.com"
    user = "admin"
    password = "******"
    protocol = "https"
    cline_get = GetHarborApi(host, user, password, protocol)
    cline_get.main()

About

harbor sdk 2.0 version

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages