Skip to main content

Override pubsub client

Project description

Arcane PubSub

This package is base on google-cloud-pubsub.

Get Started

pip install arcane-pubsub

Example Usage

from arcane import pubsub

# Import your configs
from configure import Config

client = pubsub.Client(Config.KEY)

client.push_to_topic('project', 'topic', {"parameter": "value"})

Publish with a new schema

result = pubsub_client.publish_with_schema(
    project='my-project',
    topic_name='my-topic-with-schema',
    message=message,
    await_response=True,
)

Note: publish_with_schema caches the topic schema. If you call it in a loop to publish many messages to the same schema topic, it will fetch the schema once and reuse it for the next messages. This avoids excessive SchemaServiceClient.get_schema(...) calls and prevents quota errors when publishing at high volume.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arcane_pubsub-1.5.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arcane_pubsub-1.5.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file arcane_pubsub-1.5.1.tar.gz.

File metadata

  • Download URL: arcane_pubsub-1.5.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.12 Linux/6.11.0-1018-azure

File hashes

Hashes for arcane_pubsub-1.5.1.tar.gz
Algorithm Hash digest
SHA256 860c16e6520a3efa71c3ccb1add3a9d05375cf3fa3cd431be0bfbacfef61a293
MD5 13d00a120ce7122aaf28a2041409df92
BLAKE2b-256 dfee8760842ee254a5810973b84c9465f5b84a99aebab526d8fcbdcb3041dbb9

See more details on using hashes here.

File details

Details for the file arcane_pubsub-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: arcane_pubsub-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.12 Linux/6.11.0-1018-azure

File hashes

Hashes for arcane_pubsub-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e5c86bd2bd57326ccc470b85c0c6cfcce047b2ece8b2179479484ced583b25a
MD5 d533905953b96e69a19f7625dec70358
BLAKE2b-256 7cd14c6c44f9ca524ba891d33f07f203e1960a1952d9d125a732114cd5b4d48f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page