Pub/Sub Lite API: is designed to provide reliable,
many-to-many, asynchronous messaging between applications. Publisher
applications can send messages to a topic and other applications can
subscribe to that topic to receive the messages. By decoupling senders and
receivers, Google Cloud Pub/Sub allows developers to communicate between
independently written applications.
Compared to Google Pub/Sub, Pub/Sub Lite provides partitioned zonal data
storage with predefined capacity. Both products present a similar API, but
Pub/Sub Lite has more usage caveats.
See the Google Pub/Sub Lite docs for more details on how to activate
Pub/Sub Lite for your project, as well as guidance on how to choose between
Cloud Pub/Sub and Pub/Sub Lite.
Install this library in a virtualenv using pip. virtualenv is a tool to
create isolated Python environments. The basic problem it addresses is one of
dependencies and versions, and indirectly permissions.
With virtualenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.
Code samples and snippets
Code samples and snippets live in the samples/ folder.
Supported Python Versions
Our client libraries are compatible with all current active and maintenance versions of
Python.
Python >= 3.7
Unsupported Python Versions
Python <= 3.6
If you are using an end-of-life
version of Python, we recommend that you update as soon as possible to an actively supported version.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["Version latestkeyboard_arrow_down\n\n- [1.12.0 (latest)](/python/docs/reference/pubsublite/latest)\n- [1.11.1](/python/docs/reference/pubsublite/1.11.1)\n- [1.10.0](/python/docs/reference/pubsublite/1.10.0)\n- [1.9.0](/python/docs/reference/pubsublite/1.9.0)\n- [1.8.3](/python/docs/reference/pubsublite/1.8.3)\n- [1.7.0](/python/docs/reference/pubsublite/1.7.0)\n- [1.6.0](/python/docs/reference/pubsublite/1.6.0)\n- [1.5.0](/python/docs/reference/pubsublite/1.5.0)\n- [1.4.3](/python/docs/reference/pubsublite/1.4.3)\n- [1.3.0](/python/docs/reference/pubsublite/1.3.0)\n- [1.2.0](/python/docs/reference/pubsublite/1.2.0)\n- [1.1.4](/python/docs/reference/pubsublite/1.1.4)\n- [1.0.2](/python/docs/reference/pubsublite/1.0.2)\n- [0.6.1](/python/docs/reference/pubsublite/0.6.1)\n- [0.5.0](/python/docs/reference/pubsublite/0.5.0)\n- [0.4.1](/python/docs/reference/pubsublite/0.4.1)\n- [0.3.0](/python/docs/reference/pubsublite/0.3.0)\n- [0.2.0](/python/docs/reference/pubsublite/0.2.0)\n- [0.1.0](/python/docs/reference/pubsublite/0.1.0) \n\nPython Client for Pub/Sub Lite API\n==================================\n\n[](https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels) [](https://pypi.org/project/google-cloud-pubsublite/) [](https://pypi.org/project/google-cloud-pubsublite/)\n\n[Pub/Sub Lite API](https://cloud.google.com/pubsub/lite): is designed to provide reliable,\nmany-to-many, asynchronous messaging between applications. Publisher\napplications can send messages to a topic and other applications can\nsubscribe to that topic to receive the messages. By decoupling senders and\nreceivers, Google Cloud Pub/Sub allows developers to communicate between\nindependently written applications.\n\nCompared to Google Pub/Sub, Pub/Sub Lite provides partitioned zonal data\nstorage with predefined capacity. Both products present a similar API, but\nPub/Sub Lite has more usage caveats.\n\nSee the [Google Pub/Sub Lite docs](about:invalid#zCSafez) for more details on how to activate\nPub/Sub Lite for your project, as well as guidance on how to choose between\nCloud Pub/Sub and Pub/Sub Lite.\n\n- [Client Library Documentation](https://cloud.google.com/python/docs/reference/pubsublite/latest)\n\n- [Product Documentation](https://cloud.google.com/pubsub/lite)\n\nQuick Start\n-----------\n\nIn order to use this library, you first need to go through the following steps:\n\n1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)\n\n2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)\n\n3. [Enable the Pub/Sub Lite API.](https://cloud.google.com/pubsub/lite)\n\n4. [Setup Authentication.](https://googleapis.dev/python/google-api-core/latest/auth.html)\n\n### Installation\n\nInstall this library in a [virtualenv](https://virtualenv.pypa.io/en/latest/) using pip. [virtualenv](https://virtualenv.pypa.io/en/latest/) is a tool to\ncreate isolated Python environments. The basic problem it addresses is one of\ndependencies and versions, and indirectly permissions.\n\nWith [virtualenv](https://virtualenv.pypa.io/en/latest/), it's possible to install this library without needing system\ninstall permissions, and without clashing with the installed system\ndependencies.\n\n### Code samples and snippets\n\nCode samples and snippets live in the samples/ folder.\n\n#### Supported Python Versions\n\nOur client libraries are compatible with all current [active](https://devguide.python.org/devcycle/#in-development-main-branch) and [maintenance](https://devguide.python.org/devcycle/#maintenance-branches) versions of\nPython.\n\nPython \\\u003e= 3.7\n\n#### Unsupported Python Versions\n\nPython \\\u003c= 3.6\n\nIf you are using an [end-of-life](https://devguide.python.org/devcycle/#end-of-life-branches)\nversion of Python, we recommend that you update as soon as possible to an actively supported version.\n\n#### Mac/Linux\n\n pip install virtualenv\n virtualenv \u003cyour-env\u003e\n source \u003cyour-env\u003e/bin/activate\n \u003cyour-env\u003e/bin/pip install google-cloud-pubsublite\n\n#### Windows\n\n pip install virtualenv\n virtualenv \u003cyour-env\u003e\n \u003cyour-env\u003e\\Scripts\\activate\n \u003cyour-env\u003e\\Scripts\\pip.exe install google-cloud-pubsublite\n\n### Next Steps\n\n- Read the [Client Library Documentation](https://cloud.google.com/python/docs/reference/pubsublite/latest) for Pub/Sub Lite API\n to see other available methods on the client.\n\n- Read the [Pub/Sub Lite API Product documentation](https://cloud.google.com/pubsub/lite) to learn\n more about the product and see How-to Guides.\n\n- View this [README](https://github.com/googleapis/google-cloud-python/blob/main/README.rst) to see the full list of Cloud\n APIs that we cover."]]