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

The following fields are returned by SELECT queries:

Successful response

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.
createTimestring (google-datetime)Output only. Time the package was created.
packageNamestringPackage for the artifact.
updateTimestring (google-datetime)Output 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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, repositoriesId, pythonPackagesIdGets a python package.
listselectprojectsId, locationsId, repositoriesIdpageSize, pageTokenLists python packages.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
locationsIdstring
projectsIdstring
pythonPackagesIdstring
repositoriesIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets a python package.

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