{"id":23825,"library":"grpc-google-pubsub-v1","title":"grpc-google-pubsub-v1","description":"Generated gRPC and protobuf definitions for the Google Cloud Pub/Sub V1 API. This library contains only the low-level gRPC stubs, not the higher-level google-cloud-pubsub client. Version 0.11.1 is the latest (as of early 2025) but this package is considered legacy; users should migrate to google-cloud-pubsub which bundles the proto stubs. Release cadence is irregular.","status":"deprecated","version":"0.11.1","language":"python","source_language":"en","source_url":"https://github.com/googleapis/googleapis","tags":["gRPC","protobuf","pubsub","deprecated","google"],"install":[{"cmd":"pip install grpc-google-pubsub-v1==0.11.1","lang":"bash","label":"Install specific version"}],"dependencies":[],"imports":[{"note":"The old grpc_google_pubsub_v1 import path is deprecated; use the google.pubsub.v1 namespace.","wrong":"from grpc_google_pubsub_v1 import PublisherGrpc","symbol":"PublisherGrpc","correct":"from google.pubsub.v1 import publisher_pb2_grpc"},{"note":"Same as above: always import from google.pubsub.v1.","wrong":"from grpc_google_pubsub_v1 import SubscriberGrpc","symbol":"SubscriberGrpc","correct":"from google.pubsub.v1 import subscriber_pb2_grpc"}],"quickstart":{"code":"import grpc\nfrom google.pubsub.v1 import publisher_pb2_grpc, publisher_pb2\n# Create channel and stub\nchannel = grpc.insecure_channel('localhost:8080')\nstub = publisher_pb2_grpc.PublisherStub(channel)\n# Build request (requires project/topic set via env or code)\nrequest = publisher_pb2.PublishRequest(topic='projects/my-project/topics/my-topic')\nprint('Stub created successfully')","lang":"python","description":"Minimal example to create a gRPC stub. Note: this package only provides protos; do not call gRPC methods without a running Pub/Sub emulator or service."},"warnings":[{"fix":"Run: pip install google-cloud-pubsub and import from google.cloud import pubsub_v1.","message":"grpc-google-pubsub-v1 is deprecated. Use google-cloud-pubsub instead for a maintained, higher-level API.","severity":"deprecated","affected_versions":"all"},{"fix":"Install exactly: pip install grpc-google-pubsub-v1","message":"Package name has no official 'google-' prefix on PyPI. Users often try 'google-grpc-pubsub-v1' which does not exist.","severity":"gotcha","affected_versions":"all"},{"fix":"Import protos from google.pubsub.v1 and create your own gRPC stubs. For convenience, upgrade to google-cloud-pubsub.","message":"This package does NOT contain the full Pub/Sub client; it only has gRPC stubs and protobuf message classes. You cannot call publish() or subscribe() directly.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: from google.pubsub.v1 import publisher_pb2_grpc","cause":"The old snake_case import path has been removed; only namespaced imports under google.pubsub.v1 work.","error":"ModuleNotFoundError: No module named 'grpc_google_pubsub_v1'"},{"fix":"Install grpc-google-pubsub-v1 and ensure googleapis-common-protos is also installed.","cause":"The package is not installed or is outdated; the google.pubsub namespace may be provided by another package (e.g., google-cloud-pubsub) which bundles protos differently.","error":"AttributeError: module 'google.pubsub.v1' has no attribute 'publisher_pb2_grpc'"},{"fix":"Use google-cloud-pubsub for the high-level client: from google.cloud import pubsub_v1\nclient = pubsub_v1.PublisherClient()","cause":"Confusion between low-level grpc layer and high-level client. This package only has gRPC stubs, not the client class.","error":"ImportError: cannot import name 'PublisherClient' from 'google.pubsub.v1'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}