Skip to main content

python_packages

Creates, updates, deletes, gets or lists a python_packages resource.

Overview

Namepython_packages
TypeResource
Idgoogle.artifactregistry.python_packages

Fields

NameDatatypeDescription
namestringRequired. registry_location, project_id, repository_name and python_package forms a unique package name:projects//locations//repository//pythonPackages/. For example, "projects/test-project/locations/us-west4/repositories/test-repo/pythonPackages/ python_package:1.0.0", where "us-west4" is the registry_location, "test-project" is the project_id, "test-repo" is the repository_name and python_package:1.0.0" is the python package.
createTimestringOutput only. Time the package was created.
packageNamestringPackage for the artifact.
updateTimestringOutput only. Time the package was updated.
uristringRequired. URL to access the package. Example: us-west4-python.pkg.dev/test-project/test-repo/python_package/file-name-1.0.0.tar.gz
versionstringVersion of this package.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, pythonPackagesId, repositoriesIdGets a python package.
listSELECTlocationsId, projectsId, repositoriesIdLists python packages.

SELECT examples

Lists python packages.

SELECT
name,
createTime,
packageName,
updateTime,
uri,
version
FROM google.artifactregistry.python_packages
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}';