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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
860c16e6520a3efa71c3ccb1add3a9d05375cf3fa3cd431be0bfbacfef61a293
|
|
| MD5 |
13d00a120ce7122aaf28a2041409df92
|
|
| BLAKE2b-256 |
dfee8760842ee254a5810973b84c9465f5b84a99aebab526d8fcbdcb3041dbb9
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e5c86bd2bd57326ccc470b85c0c6cfcce047b2ece8b2179479484ced583b25a
|
|
| MD5 |
d533905953b96e69a19f7625dec70358
|
|
| BLAKE2b-256 |
7cd14c6c44f9ca524ba891d33f07f203e1960a1952d9d125a732114cd5b4d48f
|