1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. artifactregistry
  5. getPythonPackages
Google Cloud v9.6.0 published on Wednesday, Nov 26, 2025 by Pulumi
gcp logo
Google Cloud v9.6.0 published on Wednesday, Nov 26, 2025 by Pulumi

    Get information about Artifact Registry Python packages. See the official documentation and API.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const myPackages = gcp.artifactregistry.getPythonPackages({
        location: "us-central1",
        repositoryId: "example-repo",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_packages = gcp.artifactregistry.get_python_packages(location="us-central1",
        repository_id="example-repo")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/artifactregistry"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := artifactregistry.GetPythonPackages(ctx, &artifactregistry.GetPythonPackagesArgs{
    			Location:     "us-central1",
    			RepositoryId: "example-repo",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var myPackages = Gcp.ArtifactRegistry.GetPythonPackages.Invoke(new()
        {
            Location = "us-central1",
            RepositoryId = "example-repo",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.artifactregistry.ArtifactregistryFunctions;
    import com.pulumi.gcp.artifactregistry.inputs.GetPythonPackagesArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var myPackages = ArtifactregistryFunctions.getPythonPackages(GetPythonPackagesArgs.builder()
                .location("us-central1")
                .repositoryId("example-repo")
                .build());
    
        }
    }
    
    variables:
      myPackages:
        fn::invoke:
          function: gcp:artifactregistry:getPythonPackages
          arguments:
            location: us-central1
            repositoryId: example-repo
    

    Using getPythonPackages

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getPythonPackages(args: GetPythonPackagesArgs, opts?: InvokeOptions): Promise<GetPythonPackagesResult>
    function getPythonPackagesOutput(args: GetPythonPackagesOutputArgs, opts?: InvokeOptions): Output<GetPythonPackagesResult>
    def get_python_packages(location: Optional[str] = None,
                            project: Optional[str] = None,
                            repository_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetPythonPackagesResult
    def get_python_packages_output(location: Optional[pulumi.Input[str]] = None,
                            project: Optional[pulumi.Input[str]] = None,
                            repository_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetPythonPackagesResult]
    func GetPythonPackages(ctx *Context, args *GetPythonPackagesArgs, opts ...InvokeOption) (*GetPythonPackagesResult, error)
    func GetPythonPackagesOutput(ctx *Context, args *GetPythonPackagesOutputArgs, opts ...InvokeOption) GetPythonPackagesResultOutput

    > Note: This function is named GetPythonPackages in the Go SDK.

    public static class GetPythonPackages 
    {
        public static Task<GetPythonPackagesResult> InvokeAsync(GetPythonPackagesArgs args, InvokeOptions? opts = null)
        public static Output<GetPythonPackagesResult> Invoke(GetPythonPackagesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPythonPackagesResult> getPythonPackages(GetPythonPackagesArgs args, InvokeOptions options)
    public static Output<GetPythonPackagesResult> getPythonPackages(GetPythonPackagesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:artifactregistry/getPythonPackages:getPythonPackages
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Location string
    The location of the Artifact Registry repository.
    RepositoryId string
    The last part of the repository name to fetch from.
    Project string
    The project ID in which the resource belongs. If it is not provided, the provider project is used.
    Location string
    The location of the Artifact Registry repository.
    RepositoryId string
    The last part of the repository name to fetch from.
    Project string
    The project ID in which the resource belongs. If it is not provided, the provider project is used.
    location String
    The location of the Artifact Registry repository.
    repositoryId String
    The last part of the repository name to fetch from.
    project String
    The project ID in which the resource belongs. If it is not provided, the provider project is used.
    location string
    The location of the Artifact Registry repository.
    repositoryId string
    The last part of the repository name to fetch from.
    project string
    The project ID in which the resource belongs. If it is not provided, the provider project is used.
    location str
    The location of the Artifact Registry repository.
    repository_id str
    The last part of the repository name to fetch from.
    project str
    The project ID in which the resource belongs. If it is not provided, the provider project is used.
    location String
    The location of the Artifact Registry repository.
    repositoryId String
    The last part of the repository name to fetch from.
    project String
    The project ID in which the resource belongs. If it is not provided, the provider project is used.

    getPythonPackages Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    PythonPackages List<GetPythonPackagesPythonPackage>
    A list of all retrieved Artifact Registry Python packages. Structure is defined below.
    RepositoryId string
    Project string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    PythonPackages []GetPythonPackagesPythonPackage
    A list of all retrieved Artifact Registry Python packages. Structure is defined below.
    RepositoryId string
    Project string
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    pythonPackages List<GetPythonPackagesPythonPackage>
    A list of all retrieved Artifact Registry Python packages. Structure is defined below.
    repositoryId String
    project String
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    pythonPackages GetPythonPackagesPythonPackage[]
    A list of all retrieved Artifact Registry Python packages. Structure is defined below.
    repositoryId string
    project string
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    python_packages Sequence[GetPythonPackagesPythonPackage]
    A list of all retrieved Artifact Registry Python packages. Structure is defined below.
    repository_id str
    project str
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    pythonPackages List<Property Map>
    A list of all retrieved Artifact Registry Python packages. Structure is defined below.
    repositoryId String
    project String

    Supporting Types

    GetPythonPackagesPythonPackage

    CreateTime string
    The time, as a RFC 3339 string, this package was created.
    Name string
    The fully qualified name of the fetched package. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/pythonPackages/{{pythonPackage}}. For example, projects/example-project/locations/us-central1/repository/example-repo/pythonPackages/my-test-package:0.0.1
    PackageName string
    Extracted short name of the package (last part of name, without version). For example, from .../my-test-package:0.0.1my-test-package.
    UpdateTime string
    The time, as a RFC 3339 string, this package was updated.
    Version string
    Version of this package.
    CreateTime string
    The time, as a RFC 3339 string, this package was created.
    Name string
    The fully qualified name of the fetched package. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/pythonPackages/{{pythonPackage}}. For example, projects/example-project/locations/us-central1/repository/example-repo/pythonPackages/my-test-package:0.0.1
    PackageName string
    Extracted short name of the package (last part of name, without version). For example, from .../my-test-package:0.0.1my-test-package.
    UpdateTime string
    The time, as a RFC 3339 string, this package was updated.
    Version string
    Version of this package.
    createTime String
    The time, as a RFC 3339 string, this package was created.
    name String
    The fully qualified name of the fetched package. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/pythonPackages/{{pythonPackage}}. For example, projects/example-project/locations/us-central1/repository/example-repo/pythonPackages/my-test-package:0.0.1
    packageName String
    Extracted short name of the package (last part of name, without version). For example, from .../my-test-package:0.0.1my-test-package.
    updateTime String
    The time, as a RFC 3339 string, this package was updated.
    version String
    Version of this package.
    createTime string
    The time, as a RFC 3339 string, this package was created.
    name string
    The fully qualified name of the fetched package. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/pythonPackages/{{pythonPackage}}. For example, projects/example-project/locations/us-central1/repository/example-repo/pythonPackages/my-test-package:0.0.1
    packageName string
    Extracted short name of the package (last part of name, without version). For example, from .../my-test-package:0.0.1my-test-package.
    updateTime string
    The time, as a RFC 3339 string, this package was updated.
    version string
    Version of this package.
    create_time str
    The time, as a RFC 3339 string, this package was created.
    name str
    The fully qualified name of the fetched package. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/pythonPackages/{{pythonPackage}}. For example, projects/example-project/locations/us-central1/repository/example-repo/pythonPackages/my-test-package:0.0.1
    package_name str
    Extracted short name of the package (last part of name, without version). For example, from .../my-test-package:0.0.1my-test-package.
    update_time str
    The time, as a RFC 3339 string, this package was updated.
    version str
    Version of this package.
    createTime String
    The time, as a RFC 3339 string, this package was created.
    name String
    The fully qualified name of the fetched package. This name has the form: projects/{{project}}/locations/{{location}}/repository/{{repository_id}}/pythonPackages/{{pythonPackage}}. For example, projects/example-project/locations/us-central1/repository/example-repo/pythonPackages/my-test-package:0.0.1
    packageName String
    Extracted short name of the package (last part of name, without version). For example, from .../my-test-package:0.0.1my-test-package.
    updateTime String
    The time, as a RFC 3339 string, this package was updated.
    version String
    Version of this package.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud v9.6.0 published on Wednesday, Nov 26, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate