Async Harbor API v2.0 client
Project description
harborapi
Python async client for the Harbor REST API v2.0 based on the official Harbor REST API specification.
NOTE: The official Harbor API spec is hand-written, and numerous errors and inconsistencies have been found in it. This library attempts to work around these issues as much as possible, but errors may still occur. If you find any errors, please open an issue.
Features
- Async API
- Extensive type hint coverage
- Data validation with Pydantic
- Built-in retry functionality with backoff
- Optional Rich support
Installation
pip install harborapi
Documentation
Documentation is available here. The documentation is still a work in progress, and you may have to dig around a bit to find what you're looking for.
Creating proper documentation for the Pydantic models is priority number one right now, but is largely blocked by the lack of inheritance support in the mkdocstrings python plugin.
Quick Start
Authentication
from harborapi import HarborAsyncClient
client = HarborAsyncClient(
url="https://demo.goharbor.io/api/v2.0/",
username="username",
secret="secret",
# OR
basicauth="base64-basic-auth-credentials",
# OR
credentials_file="/path/to/robot-credentials-file.json",
)
Get all projects
import asyncio
from harborapi import HarborAsyncClient
client = HarborAsyncClient(
# ...
)
async def main() -> None:
# Get all projects
projects = await client.get_projects()
for project in projects:
print(project.name)
# If you have rich installed:
import rich
for project in projects:
rich.print(project)
asyncio.run(main())
Create a project
import asyncio
from harborapi import HarborAsyncClient
from harborapi.models import ProjectReq, ProjectMetadata
client = HarborAsyncClient(
# ...
)
async def main() -> None:
project_path = await client.create_project(
ProjectReq(
project_name="test-project",
metadata=ProjectMetadata(
public=True,
),
)
)
print(f"Project created: {project_path}")
asyncio.run(main())
All endpoints are documented in the endpoints documentation.
Disclaimer
harborapi makes use of code generation for its data models, but it doesn't entirely rely on it like, for example, githubkit. Thus, while the library is based on the Harbor REST API specification, it is not beholden to it. The official schema contains several inconsistencies and errors, and this package takes steps to rectify some of these locally until they are fixed in the official Harbor API spec.
harborapi attempts to improve endpoint descriptions where possible and fix models with fields given the wrong type or wrongly marked as required. Without these changes, the validation provided by the library would be unusable for certain endpoints, as these endpoints can, in certain cases, return data that is inconsistent with the official API specification, thus breaking the model validation.
To return the raw API responses without validation and type conversion, set raw=True when instantiating the client. For more information, check the documentation on validation.
TODO
Endpoints
- Preheat
0.26.2 - 2025-01-21
Fixed
- Missing import error when using httpx>=0.28.0. (#102)
0.26.1 - 2024-11-26
Fixed
- Incorporate missing SBOM and
HarborAsyncClient.get_project_artifacts()changes intended for 0.26.0.
0.26.0 - 2024-11-25
Added
- Project artifacts method:
HarborAsyncClient.get_project_artifacts() with_sbom_overviewparameter forHarborAsyncClient.get_artifact()andHarborAsyncClient.get_artifacts()to include SBOM overview in the response.
Changed
- Models updated to API schema from c97253f
- All root models now share a common
harborapi.models.base.RootModelbase class.
Fixed
- Root models failing to build on Pydantic 2.10.
Removed
- Generic aliased root models:
harborapi.models.base.StrDictRootModelharborapi.models.base.StrRootModel
0.25.3 - 2024-08-26
Added
- Model fields:
ProjectMetadata.proxy_speed_kbConfigurations.ldap_group_attach_parallelConfigurationsResponse.ldap_group_attach_parallelRobot.creatorArtifact.artifact_typeArtifact.repository_name
Fixed
HarborVulnerabilityReport.severitywhen report contains no vulnerabilities.
0.25.2 - 2024-06-26
Changed
- All Pydantic models now use
default=kwarg for default values. This prevents certain type checking errors when the model is instantiated without specifying the field.
0.25.1 - 2024-06-18
Added
harborapi.models.mappings.FirstDictwhich is a subclass of Python's built-indictthat provides afirst()method to get the first value in the dict (orNoneif the dict is empty).
Changed
HarborAsyncClient.get_artifact_vulnerability_reports()now returnsFirstDictto provide easier access to the first (and likely only) report for the artifact.
0.25.0 - 2024-06-17
Added
- Permissions method:
HarborAsyncClient.get_permissions()
- Immutable tag rules methods:
HarborAsyncClient.get_project_immutable_tag_rules()HarborAsyncClient.create_project_immutable_tag_rule()HarborAsyncClient.update_project_immutable_tag_rule()HarborAsyncClient.enable_project_immutable_tagrule()HarborAsyncClient.delete_project_immutable_tag_rule()
- Artifact vulnerability reports method:
HarborAsyncClient.get_artifact_vulnerability_reports()
- Robot V1 methods:
HarborAsyncClient.get_robots_v1()HarborAsyncClient.create_robot_v1()HarborAsyncClient.get_robot_v1()HarborAsyncClient.update_robot_v1()HarborAsyncClient.delete_robot_v1()
Removed
- References to Helm charts in
HarborAsyncClient.search().
Deprecated
HarborAsyncClient.get_artifact_vulnerabilities()in favor ofHarborAsyncClient.get_artifact_vulnerability_reports().- The old method only supported a single MIME type and was not flexible enough to support returning multiple reports given multiple MIME types. The new method supports this use case and is less strict than the old method in terms of MIME type validation.
0.24.2 - 2024-06-15
Changed
- Improved versioning script for maintainers.
0.24.1 - 2024-06-14
Fixed
- Changelog formatting.
0.24.0 - 2024-06-13
Added
- Python 3.12 support.
harborapi.models.SBOMOverviewwhich represents the SBOM overview for an artifact. Can be accessed viaArtifact.sbom_overview.
Changed
- Added compatibility methods for purge endpoint methods that were renamed in HarborAPI v0.11.0.
- The
*audit_log_rotation*methods are now deprecated and will be removed in a future release. - It never made sense to create an opinionated naming for these methods.
- The
- Project is now formatted and linted with Ruff instead of with Black and reorder-python-imports.
- Code generation now explicitly imports
StrDictRootModelandStrRootModel. - Updated API spec to ec8d692
0.23.4 - 2024-03-01
Changed
HarborAsyncClient.authenticate(verify=...)will no longer instantiate a new client object if theverifyvalue is identical to current one.
Removed
- Model field
examplekeyword arguments.
0.23.3 - 2024-03-01
Fixed
HarborAsyncClient.authenticate(verify=...)causing the client to fail to discard Harbor CSRF cookies.
0.23.2 - 2024-03-01
Added
verifyparameter forHarborAsyncClient.authenticate().- New model field:
ProjectMetadata.auto_sbom_generation
Fixed
ReplicationFilter.valuevalidation failing due to receiving non-dict value. Now acceptsstr,dict[str, Any]andNone.
0.23.1 - 2024-01-22
Changed
- All URLs now point to new repo owner.
0.23.0 - 2023-12-19
The big Pydantic V2 update. This is a major update in terms of both scope and API compatibility.
Changed
- Model validation has become more strict.
- Most importantly,
strfields will no longer coerceintvalues to strings. - See Pydantic docs for more information.
- Most importantly,
- Models without fields now inherit from
pydantic.RootModeland have a single field calledroot. These models have a special__getitem__method, so they can be accessed like a dict. Currently, these are:harborapi.models.ExtraAttrsharborapi.models.Annotationsharborapi.models.ResourceListharborapi.models.QuotaRefObjectharborapi.models.EventTypeharborapi.models.NotifyTypeharborapi.models.PayloadFormatTypeharborapi.models.AdditionLinksharborapi.models.InternalConfigurationsResponseharborapi.models.ScanOverviewharborapi.models.AdditionLinks
harborapi.models.ProjectMetadata:retention_idnow accepts both string and integer arguments. Band-aid fix until Harbor fixes their API spec and specifies that all retention IDs should be ints, not strings.
harborapi.models.Artifact:scan_overviewis now a mapping of MIME types and their associated scan overview. Previously, we used some dirty metaprogramming to populate this field with the first scan overview found in the mapping. A newscanattribute has been added to access the first scan overview in the mapping, which is the same as the old behavior. This ensures serializing the model matches the original JSON from the API.
harborapi.ext.report.ArtifactReport:- No longer supports iteration directly on the object itself. Use the
artifactsattribute instead.
- No longer supports iteration directly on the object itself. Use the
- Bool to string converter now limited to
harborapi.models.ProjectMetadatamodel. This aberrant behavior is limited to ProjectMetadata, so the converter has been moved to the model itself. This band-aid fix will remain until Harbor changes their API spec and make these fields bools.
Removed
missing_okparameter for all relevant client methods.
Deprecated
harborapi.models._modelsmodule. All main API spec models are now definedharborapi.models.models.harborapi.models._scannermodule. All scanner models are now defined inharborapi.models.scanner.
0.22.3 - 2023-09-13
Changed
- Lower bounds of dependencies loosened to allow for certain older versions:
httpx>= 0.22.0typing_extensions>= 4.4
0.22.2 - 2023-09-13
Changed
- License changed from GPLv3 to MIT.
0.22.1 - 2023-09-05
Changed
- Reduced sdist size significantly by removing unnecessary files (docs, tests, etc.).
0.22.0 - 2023-08-01
Changed
- Pydantic version capped at <2.0.0.
- Migration to Pydantic V2 will begin soon.
0.21.0 - 2023-06-08
Added
- Missing optional
limitargument for methods that fetch multiple resources:HarborAsyncClient.get_replication_tasksHarborAsyncClient.search_usergroupsHarborAsyncClient.get_webhook_policy_last_triggerHarborAsyncClient.search_ldap_groupsHarborAsyncClient.search_ldap_usersHarborAsyncClient.get_registry_adaptersHarborAsyncClient.get_artifact_build_history
Changed
HarborAsyncClient.get_replication_tasksargument order changed. Nowstatusandresource_typefollow the required argumentproject_idinstead of after the optionalquery,sort,page,page_sizeandlimitarguments.harborapi.models.ScannerPropertiesnow takes an arbitrary number of extra fields instead of using a__root__field.
Removed
- Deprecated fields removed in API spec(
bf7c82b):harborapi.models.Tag.signedharborapi.models.GeneralInfo.with_notary
0.20.0 - 2023-05-30
Changed
HarborAsyncClient.delete_scannernow raisesHarborAPIExceptionif no scanner response is returned from the API (wasUnprocessableEntitybefore).
Removed
- Loguru dependency. The library now uses the standard Python logging library for logging purposes. See Logging in the docs for more information.
0.19.0 - 2023-05-15
Added
BaseModel.get_model_fields, a class method which returns a list of names of all fields defined in the model's schema.
Changed
- BREAKING: Updated model schemas (`10c54c0..b232c90). Changes listed below:
- Add model:
PayloadFormatType - Add model:
PayloadFormat - Add field:
SupportedWebhookEventTypes.payload_formats - Add field:
Accessory.subject_artifact_digest - Add field:
Accessory.subject_artifact_repo - Update field:
Access.resourcedescription - Update field:
Access.actiondescription - Update field:
ComponentHealthStatus.statusdescription - Update field:
Robot.namedescription - Update field:
Robot.expires_atdescription - Update field:
RobotCreate.namedescription - Deprecate field:
Accessory.subject_artifact_id - Remove model:
ChartMetadata(deprecated) - Remove model:
ChartVersion(deprecated) - Remove model:
SearchResult(deprecated) - Remove field
Project.chart_count(deprecated)
- Add model:
0.18.1 - 2023-05-12
Added
BaseModel.convert_to, which allows converting a model to another model type that has a similar schema, such asProjecttoProjectReq.
Fixed
- Bool to string converter on
BaseModelnow correctly handles assignments.
0.18.0 - 2023-05-05
Added
- New context manager for temporarily disabling retrying:
HarborAsyncClient.no_retry - New context manager for temporarily disabling validation:
HarborAsyncClient.no_validation - New context manager for temporarily enabling raw mode:
HarborAsyncClient.raw_mode - Accept
passwordkwarg forHarborAsyncClientconstructor, while emitting warning for it. It isn't encouraged (or documented) to usepassword, but it might be more natural for many users thansecret, so we allow it, since we already accept arbitrary kwargs.
Changed
RetrySettings.max_triesnow only accepts values greater than 0.RetrySettings.max_timenow only accepts values greater or equal to 0.- Models fields assignments are now validated by default.
models.base.BaseModel.bool_converterrenamed tomodels.base.BaseModel._bool_converterto hide it in IDE autocompletion. This shouldn't be a breaking change for anyone, since it was never documented or intended to be used by anyone outside of the library.
0.17.0 - 2023-05-03
Added
- Configurable retrying of failed requests using the new
RetrySettingsclass, which can be passed to theHarborAsyncClientconstructor with theretrykeyword argument. See the retry docs for more information.
Fixed
- Methods that fetched files using the wrong
Acceptheader have been fixed. This includes:HarborAsyncClient.download_scan_exportHarborAsyncClient.get_system_certificate
Changed
harborapi.errors.StatusError.status_code is now always an integer. Returns 0 if no request is associated with the error.
0.16.2 - 2023-04-26
Added
- Disclaimer for
harborapi.HarborAsyncClient.delete_retention_policy, warning that it can break a project due to a bug in Harbor.
Changed
- Move
harborapi.client.ResponseLogandharborapi.client.ResponseLogEntrytoharborapi.responselogmodule.
Fixed
harborapi.models.VulnerabilityItem.severityfield has had its type reverted toSeverityfromOptional[Severity], which was a regression introduced in v0.16.0.harborapi.ext.regex.matchreturn type annotation is now correctly marked asOptional[Match[str]]instead ofMatch[str].harborapi.HarborAsyncClient.get_retention_tasksmissinglimitparameter in docstring.
0.16.1 - 2023-04-24
Fixed
- Passing a
NativeReportSummarytoArtifact.scan_overviewno longer raises aValidationErrorexception.
0.16.0 - 2023-04-24
Changed
- Broken or incomplete models are now completely redefined in
harborapi.models.modelsto provide better documentation both in the code and in the generated documentation. This change should be backwards-compatible. harborapi.HarborAsyncClient.add_group_membernow has a clearner warning describing its purpose and the alternative methods to use instead.
0.15.3 - 2023-04-20
Fixed
- Models with fields that wrongly required dicts of dicts now accept dicts of any for the affected fields:
harborapi.models.RetentionRule.paramsharborapi.models.ImutableRule.paramsUntil the official API spec is fixed, this is the best we can do.
0.15.2 - 2023-04-18
Removed
harborbeing added as an executable script installed by the project. This was a mistake, as theharborexecutable script is intended to be exposed by harbor-cli.
0.15.1 - 2023-04-17
Added
HarborAsyncClient.authenticate(). This method can be used to re-authenticate the client with new credentials without having to create a new client instance.
Changed
HarborAsyncClient.get_artifact_vulnerabilities()now always returns aharborapi.models.HarborVulnerabilityReportobject. If the artifact has no vulnerabilities or the report cannot be processed, an exception is raised.
Removed
configargument fromHarborAsyncClient.__init__(). Theconfigargument was never implemented.
0.15.0 - 2023-04-13
Added
- Retention methods:
HarborAsyncClient.get_project_retention_id()HarborAsyncClient.get_retention_policy()HarborAsyncClient.create_retention_policy()HarborAsyncClient.update_retention_policy()HarborAsyncClient.delete_retention_policy()HarborAsyncClient.get_retention_tasks()HarborAsyncClient.get_retention_metadata()HarborAsyncClient.get_retention_execution_task_log()HarborAsyncClient.get_retention_executions()HarborAsyncClient.start_retention_execution()HarborAsyncClient.stop_retention_execution()
0.14.1 - 2023-04-11
Added
verifykwarg forHarborAsyncClientandHarborClientwhich is passed to the underlyinghttpx.AsyncClient. This is useful for self-signed certificates, or if you want to control the SSL verification yourself. See httpx documentation for more information.harborapi.exceptions.StatusError.responsewhich holds the HTTPX response object that caused the exception.
Fixed
- Potential circular import error in
harborapi.ext, whereHarborAsyncClientis imported as a type annotation.
0.14.0 - 2023-04-05
Changed
limitkwarg now treats0as no limit. Previously,0meant no results would be returned.- BREAKING:
harborapi.ext.artifact.ArtifactInfo.tagsnow returns a list of tags instead of a comma-separated string of tags. This gives more flexibility to work with the various tags, and is more consistent with the rest of the library. If you need the comma-separated string, you can use", ".join(artifact_info.tags).
0.13.1 - 2023-04-03
Fixed
- Pagination URLs containing spaces are now properly handled. This could occur if passing a a query parameter with a list of items, such as
?q=operation={push pull}or?q=operation=(push pull).
0.13.0 - 2023-03-31
Changed
HarborAsyncClient.update_project_member_role()now accepts integer arguments for itsrole_idparameter, sinceRoleRequestonly has a single field (role_id).
Fixed
- Potential bug with
models.VulnerabilitySummaryifsummaryisNone. - JSON parsing exception in
HarborAsyncClient.get_audit_log_rotation_schedule()that could occur if no schedule exists. The API returns an emtpy200 OKresponse, which is now handled correctly (emptyExecHistoryobject). - Missing docstring for
HarborAsycClient.get_project_members.
0.12.0 - 2023-03-14
Changed
- BREAKING:
HarborAsyncClient.export_scan_data()now takes the arguments in the order (criteria,scan_type). Furthermore,scan_typenow has a default argument of"application/vnd.security.vulnerability.report; version=1.1", per the blog post describing this new feature. It should not be necessary specify this argument, but it is still possible to do so if you need to.
0.11.2 - 2023-03-14
Fixed
- Actually adds
group_nameparameter forHarborAsyncClient.get_usergroups()this time.
Added
- Missing
group_nameandlimitparameters forHarborAsyncClient.get_usergroups().
0.11.1 - 2023-03-14
Added
- Missing
group_nameandlimitparameters forHarborAsyncClient.get_usergroups().
0.11.0 - 2023-03-10
Added
HarborAsyncClient.get_system_certificate()- Returns the system certificate. (
GET /api/v2.0/systeminfo/getcert)
- Returns the system certificate. (
Changed
- BREAKING: Methods that download files, now return
FileResponseinstead of a bytes object.FileResponsecontains the file contents along with its metadata. The object can be passed tobytes()to get the response contents, otherwise it can be accessed via theFileResponse.contentattribute. - BREAKING: Renamed "purge" methods to better reflect their purpose of audit log rotation:
HarborAsyncClient.get_purge_audit_log_status()->HarborAsyncClient.get_audit_log_rotation()HarborAsyncClient.get_purge_audit_log()->HarborAsyncClient.get_audit_log_rotation_log()HarborAsyncClient.stop_purge_audit_log()->HarborAsyncClient.stop_audit_log_rotation()HarborAsyncClient.get_purge_audit_log_schedule()->HarborAsyncClient.get_audit_log_rotation_schedule()HarborAsyncClient.create_purge_audit_log_schedule()->HarborAsyncClient.create_audit_log_rotation_schedule()HarborAsyncClient.update_purge_audit_log_schedule()->HarborAsyncClient.update_audit_log_rotation_schedule()HarborAsyncClient.get_purge_audit_logs()->HarborAsyncClient.get_audit_log_rotation_history()
0.10.0 - 2023-02-28
Added
harborapi.ext.artifact.ArtifactInfo.name_with_digest_fullwhich returns the artifact name with the full SHA256 digest, not just the first 15 characters likename_with_digest.- Audit log purging methods.
HarborAsyncClient.get_purge_audit_log_status()HarborAsyncClient.get_purge_audit_log()HarborAsyncClient.stop_purge_audit_log()HarborAsyncClient.get_purge_audit_log_schedule()HarborAsyncClient.create_purge_audit_log_schedule()HarborAsyncClient.update_purge_audit_log_schedule()HarborAsyncClient.get_purge_audit_logs()
- Documentation for
HarborAsyncClient.get_project_deletable(). - Webhook methods.
HarborAsyncClient.get_webhook_jobs()HarborAsyncClient.get_webhook_policies()HarborAsyncClient.get_webhook_policy()HarborAsyncClient.create_webhook_policy()HarborAsyncClient.update_webhook_policy()HarborAsyncClient.delete_webhook_policy()HarborAsyncClient.get_webhook_policy_last_trigger()HarborAsyncClient.get_webhook_supported_events()
- Scan Data Export Methods
HarborAsyncClient.get_scan_export()HarborAsyncClient.get_scan_exports()HarborAsyncClient.export_scan_data()HarborAsyncClient.download_scan_export()
- Icon methods
HarborAsyncClient.get_icon()
- Label methods
HarborAsyncClient.get_label()HarborAsyncClient.create_label()HarborAsyncClient.delete_label()HarborAsyncClient.get_labels()
- Project member methods
HarborAsyncClient.get_project_member()HarborAsyncClient.add_project_member()HarborAsyncClient.add_project_member_user()HarborAsyncClient.add_project_member_group()HarborAsyncClient.update_project_member_role()HarborAsyncClient.remove_project_member()HarborAsyncClient.get_project_members()
- New methods for controlling the size of the response log.
harborapi.client.ResponseLog.resize()harborapi.client.ResponseLog.clear()- Documented here
basicauthas a parameter forHarborAsyncClient.__init__()to pass in base64 basic auth credentials.
Changed
missing_okparameter for DELETE methods has been deprecated. Manually handleharborapi.exceptions.NotFoundinstead. This parameter will stop working in version 1.0.0, and be removed altogether in a later release.harborapi.models.Repository.split_name()now returns a tuple instead of a list, as its docstring states it should.- DEPRECATED: Using
credentialsas a parameter forHarborAsyncClient.__init__is deprecated. Usebasicauthinstead. HarborAsyncClient.credentialsis now a Pydantic SecretStr, which prevents it from being printed in clear text when locals are dumped, such as when printing the client object. To access the value, useHarborAsyncClient.credentials.get_secret_value().
Removed
- Explicit logging calls from
HarborAsyncClient.set_user_cli_secret()andHarborAsyncClient.set_user_password(). The exception handler handles logging if configured.
0.9.0 - 2023-02-21
Changed
-
Updated
harborapi.modelsto match the latest version of the Harbor API spec goharbor/harbor@d03f0dc. -
harborapi.models.GeneralInfo.with_chartmuseumhas been removed from the API spec, but remains on the model for backwards compatibility. In the future, this field will be removed, as the API will never return this it in sufficiently new versions of Harbor.
0.8.6 - 2023-02-20
Fixed
- Models with
harborapi.models.ScheduleObjfields are now correctly validated when the Harbor API responds with a value of"Schedule"for the fieldScheduleObj.type, which is not a valid value for the enum according to their own spec.
0.8.5 - 2023-02-20
Added
NativeReportSummary.severity_enum which returns the severity of the report as a harborarpi.scanner.Severity enum, which can be used for comparisons between reports.
Fixed
harborarpi.scanner.Severity enum not having a None value, which is observed when a report has no vulnerabilities.
0.8.4 - 2023-02-14
Fixed
- Certain resource enumeration methods missing the
limitparameter. HarborAsyncClient.get_gc_jobs()ignoring user parameters.
0.8.3 - 2023-02-14
Changed
- BREAKING:
HarborAsyncClient.update_robot_tokenrenamed toHarborAsyncClient.refresh_robot_tokento better reflect the API endpoint name and purpose.
Fixed
- Pagination failing when one or more query parameter values included a comma.
- Certain
HarborAsyncClientmethods having missing or incomplete docstrings.
0.8.2 - 2023-02-09
Fixed
HarborAsyncClient.get_registry_providersnow returns aRegistryProvidersobject, which is a model whose only attributeprovidersis a dict ofRegistryProviderInfoobjects. Previously this method attempted to return a list ofRegistryProviderInfoobjects, but this was incorrect.
0.8.1 - 2023-02-09
Changed
- Backoff handlers for HTTP methods now handle a more strict subset of
httpx.RequestErrorexceptions. This is to avoid retrying on exceptions that will never succeed such ashttpx.UnsupportedProtocol.
0.8.0 - 2023-02-08
Added
limitparameter for all methods that return a list of items. This parameter is used to limit the number of items returned by the API. See the docs for more details.
Removed
retrieve_allparameter for all methods that return a list of items. Use the newlimitparameter to control the number of results to retrieve. Passingretrieve_allto these methods will be silently ignored. In the future this will raise a DeprecationWarning.
0.7.1 - 2023-02-07
Added
- New parameters
rawandvalidatetoHarborAsyncClientandHarborClientto control whether the client returns the raw data from the API, and whether the client validates the data from the API, respectively. See the docs for more details.
0.7.0 - 2023-02-06
Added
- New models from 2022-11-28 spec update.
Changed
- Updated models from 2022-11-28 spec update.
- Generated models are now defined in
models._modelsandmodels._scanner, and the overrides for these models are defined inmodels.modelsandmodels.scannerrespectively. This is to make it easier to regenerate the models in the future while keeping the extended functionality (such asRepository.project_name,ScanOverview.__new__, etc.) for these classes intact, since that is now declared separately from the generated models. Furthermore,models.modelsandmodels.scannerboth re-export all the generated models so that the API remains unchanged. See the Justfile for more details on how the models are generated.
Fixed
HarborAsyncClient.search()raising an error when finding Helm Charts with an emptyenginefield.
Removed
- BREAKING:
HarborAsyncClient.get_internal_config(). This endpoint is meant for internal usage only, and the new model definitions don't seem to play well with it. If you need this endpoint, please open an issue.
0.6.0 - 2023-01-30
Changed
- BREAKING: The
max_depthparameter of theas_table()andas_panel()methods on all models now starts counting from 1 instead of 0.max_depth=0now means "no limit", andmax_depth=1means "only show the top level" (previouslymax_depth=0meant "only show the top level" andmax_depth=1meant "show the top level and one level below")
0.5.0 - 2023-01-17
Added
- Changelog
- Rich as optional dependency:
pip install harborapi[rich]
Changed
- Use Hatch as build system.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file harborapi-0.26.2.tar.gz.
File metadata
- Download URL: harborapi-0.26.2.tar.gz
- Upload date:
- Size: 111.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e005c66840b34c44b0b0a808af2c6180729d16fb272c784772f6f25eae8eaed
|
|
| MD5 |
1b76fbe8c80263683413264ce3fb958e
|
|
| BLAKE2b-256 |
ed6118a04a691105c65d549349be7f18b51f9ffe93b39e0f33133f45eb1ebec7
|
File details
Details for the file harborapi-0.26.2-py3-none-any.whl.
File metadata
- Download URL: harborapi-0.26.2-py3-none-any.whl
- Upload date:
- Size: 97.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b57efa99d416b3142f2d5bfd90dee749d2c30740596410943f021a9212a816e0
|
|
| MD5 |
6a94e3bb0aeb50dbd4ba0be56734251b
|
|
| BLAKE2b-256 |
8550926cb8c5300c1d2e6438dfa4f90ab7889616e8a3ffa902b1c683abcaee11
|