plexflow 0.0.89__py3-none-any.whl → 0.0.92__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ from google.cloud import pubsub_v1
2
+ import json
3
+
4
+ def produce_message(value, topic_id: str, project_id: str, as_json: bool = True):
5
+ publisher = pubsub_v1.PublisherClient()
6
+ # The `topic_path` method creates a fully qualified identifier
7
+ # in the form `projects/{project_id}/topics/{topic_id}`
8
+ topic_path = publisher.topic_path(project_id, topic_id)
9
+
10
+ if as_json:
11
+ data_str = json.dumps(value)
12
+ else:
13
+ data_str = str(value)
14
+
15
+ # Data must be a bytestring
16
+ data = data_str.encode("utf-8")
17
+ # When you publish a message, the client returns a future.
18
+ future = publisher.publish(topic_path, data)
19
+ print(future.result())
20
+
21
+ print(f"Published messages to {topic_path}.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: plexflow
3
- Version: 0.0.89
3
+ Version: 0.0.92
4
4
  Summary: A short description of the package.
5
5
  License: MIT
6
6
  Keywords: keyword1,keyword2,keyword3
@@ -28,13 +28,13 @@ Requires-Dist: cohere (>=5.5.0,<6.0.0)
28
28
  Requires-Dist: dataclasses-json (>=0.6.4,<0.7.0)
29
29
  Requires-Dist: dateparser (>=1.2.0,<2.0.0)
30
30
  Requires-Dist: fake-useragent (>=1.4.0,<2.0.0)
31
+ Requires-Dist: google-cloud-pubsub (>=2.28.0,<3.0.0)
31
32
  Requires-Dist: groq (>=0.9.0,<0.10.0)
32
33
  Requires-Dist: html5lib (>=1.1,<2.0)
33
34
  Requires-Dist: humanfriendly (>=10.0,<11.0)
34
35
  Requires-Dist: iso639-lang (>=2.2.3,<3.0.0)
35
36
  Requires-Dist: json-repair (>=0.19.1,<0.20.0)
36
37
  Requires-Dist: kafka (>=1.3.5,<2.0.0)
37
- Requires-Dist: kafka-python (>=2.0.5,<3.0.0)
38
38
  Requires-Dist: langchain-groq (>=0.1.9,<0.2.0)
39
39
  Requires-Dist: langcodes (>=3.4.0,<4.0.0)
40
40
  Requires-Dist: lxml (>=5.1.0,<6.0.0)
@@ -588,6 +588,7 @@ plexflow/utils/filesystem/search.py,sha256=ed2ixbx5r2z_xtk19--Dfi5KK9g3HcsaAk0sq
588
588
  plexflow/utils/gmail/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
589
589
  plexflow/utils/gmail/__pycache__/mails.cpython-311.pyc,sha256=FAYfZzjLVqpPMjrEYcrOIsohtWrZYYXOZSUHod3r8Qg,7239
590
590
  plexflow/utils/gmail/mails.py,sha256=hQIXiYR5LYeoiSH_lhbVM9criDBnTeCNmpZ5tvuUnsA,4562
591
+ plexflow/utils/google/pubsub/produce.py,sha256=AFlf6QZl6owA4QNzgrmed-d8lFbhsy-0bnMVVbAGNt4,713
591
592
  plexflow/utils/hooks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
592
593
  plexflow/utils/hooks/__pycache__/__init__.cpython-311.pyc,sha256=vlT8vFKsxMRss2XuHLM6ouyTl7Wk1To76MVYXowIABs,170
593
594
  plexflow/utils/hooks/__pycache__/__init__.cpython-312.pyc,sha256=c2gIcwOonxPVWWXQE6C3BgiQ7CBIM4EOrvTxD0TIbyw,158
@@ -675,7 +676,7 @@ plexflow/utils/video/__pycache__/audio.cpython-312.pyc,sha256=vXBnJwWgTDFdixMBs-
675
676
  plexflow/utils/video/__pycache__/subtitle.cpython-312.pyc,sha256=PCjpCLydGXaRsQy6cikhgsEs8WlComfOoYPiLFqfVMA,2515
676
677
  plexflow/utils/video/audio.py,sha256=tJ_lNwcjVuBQYD5cYOlXpr__eh8-hnReIgNRgIYOpqo,3380
677
678
  plexflow/utils/video/subtitle.py,sha256=LOGONGxs_RzmqtGP-DBKreOzS1eUFEKo75Q6AfnavW0,1290
678
- plexflow-0.0.89.dist-info/METADATA,sha256=aJOMmDKSHN5V4NcIhjzFb6uRFvqRvoaLCTzpx60MsEc,2945
679
- plexflow-0.0.89.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
680
- plexflow-0.0.89.dist-info/entry_points.txt,sha256=aEqDHlozu_zjWrl2sibtrqtQHMgU8kSJZrE782CP47g,1362
681
- plexflow-0.0.89.dist-info/RECORD,,
679
+ plexflow-0.0.92.dist-info/METADATA,sha256=KFluh3UpTaNVM05w_Qw8GR51NlFT2NHPueEoQpkorz4,2953
680
+ plexflow-0.0.92.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
681
+ plexflow-0.0.92.dist-info/entry_points.txt,sha256=aEqDHlozu_zjWrl2sibtrqtQHMgU8kSJZrE782CP47g,1362
682
+ plexflow-0.0.92.dist-info/RECORD,,