airless-google-cloud-core 0.1.0.dev0__tar.gz → 0.1.1.dev1__tar.gz

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.
Files changed (20) hide show
  1. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/PKG-INFO +2 -2
  2. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless/google/cloud/core/operator/delay.py +0 -1
  3. airless_google_cloud_core-0.1.1.dev1/airless/google/cloud/core/operator/redirect.py +15 -0
  4. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless/google/cloud/pubsub/hook/pubsub.py +1 -1
  5. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless_google_cloud_core.egg-info/PKG-INFO +2 -2
  6. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless_google_cloud_core.egg-info/requires.txt +1 -1
  7. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/pyproject.toml +1 -1
  8. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/requirements.txt +1 -1
  9. airless_google_cloud_core-0.1.0.dev0/airless/google/cloud/core/operator/redirect.py +0 -22
  10. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/README.md +0 -0
  11. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless/google/cloud/core/__init__.py +0 -0
  12. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless/google/cloud/core/operator/__init__.py +0 -0
  13. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless/google/cloud/core/operator/base.py +0 -0
  14. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless/google/cloud/pubsub/__init__.py +0 -0
  15. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless/google/cloud/pubsub/hook/__init__.py +0 -0
  16. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless_google_cloud_core.egg-info/SOURCES.txt +0 -0
  17. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless_google_cloud_core.egg-info/dependency_links.txt +0 -0
  18. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/airless_google_cloud_core.egg-info/top_level.txt +0 -0
  19. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/setup.cfg +0 -0
  20. {airless_google_cloud_core-0.1.0.dev0 → airless_google_cloud_core-0.1.1.dev1}/tests/test_fake.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airless-google-cloud-core
3
- Version: 0.1.0.dev0
3
+ Version: 0.1.1.dev1
4
4
  Summary: Airless package with the main components to use airless in google cloud
5
5
  License: MIT License
6
6
  Project-URL: Homepage, https://github.com/astercapital/airless
@@ -8,7 +8,7 @@ Project-URL: Bug Tracker, https://github.com/astercapital/airless/issues
8
8
  Requires-Python: >=3.9
9
9
  Description-Content-Type: text/markdown
10
10
  Requires-Dist: google-cloud-pubsub<3.0.0,>=2.13.11
11
- Requires-Dist: airless-core<0.3.0,>=0.2.1.dev1
11
+ Requires-Dist: airless-core<0.3.0,>=0.2.1
12
12
 
13
13
  # airless-google-cloud-core
14
14
 
@@ -7,5 +7,4 @@ class GoogleDelayOperator(GoogleBaseEventOperator, DelayOperator):
7
7
  """Operator that adds a delay to the pipeline."""
8
8
 
9
9
  def __init__(self) -> None:
10
- """Initializes the GoogleDelayOperator."""
11
10
  super().__init__()
@@ -0,0 +1,15 @@
1
+
2
+ from airless.core.operator import RedirectOperator
3
+ from airless.google.cloud.core.operator import GoogleBaseEventOperator
4
+
5
+
6
+ class GoogleRedirectOperator(GoogleBaseEventOperator, RedirectOperator):
7
+
8
+ """Google Cloud implementation of RedirectOperator.
9
+
10
+ Operator that receives one event from a Google Pub/Sub topic and publishes
11
+ multiple messages to another topic.
12
+ """
13
+
14
+ def __init__(self):
15
+ super().__init__()
@@ -30,7 +30,7 @@ class GooglePubsubHook(QueueHook):
30
30
  if get_config('ENV') == 'prod':
31
31
  topic_path = self.publisher.topic_path(project or get_config('GCP_PROJECT'), topic)
32
32
 
33
- message_bytes = json.dumps(data).encode('utf-8')
33
+ message_bytes = json.dumps(data, default=str).encode('utf-8')
34
34
 
35
35
  publish_future = self.publisher.publish(topic_path, data=message_bytes)
36
36
  publish_future.result(timeout=10)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airless-google-cloud-core
3
- Version: 0.1.0.dev0
3
+ Version: 0.1.1.dev1
4
4
  Summary: Airless package with the main components to use airless in google cloud
5
5
  License: MIT License
6
6
  Project-URL: Homepage, https://github.com/astercapital/airless
@@ -8,7 +8,7 @@ Project-URL: Bug Tracker, https://github.com/astercapital/airless/issues
8
8
  Requires-Python: >=3.9
9
9
  Description-Content-Type: text/markdown
10
10
  Requires-Dist: google-cloud-pubsub<3.0.0,>=2.13.11
11
- Requires-Dist: airless-core<0.3.0,>=0.2.1.dev1
11
+ Requires-Dist: airless-core<0.3.0,>=0.2.1
12
12
 
13
13
  # airless-google-cloud-core
14
14
 
@@ -1,2 +1,2 @@
1
1
  google-cloud-pubsub<3.0.0,>=2.13.11
2
- airless-core<0.3.0,>=0.2.1.dev1
2
+ airless-core<0.3.0,>=0.2.1
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "airless-google-cloud-core"
3
- version = "0.1.0.dev"
3
+ version = "0.1.1.dev1"
4
4
  description = "Airless package with the main components to use airless in google cloud"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.9"
@@ -1,3 +1,3 @@
1
1
  google-cloud-pubsub>=2.13.11,<3.0.0
2
2
 
3
- airless-core>=0.2.1.dev1,<0.3.0
3
+ airless-core>=0.2.1,<0.3.0
@@ -1,22 +0,0 @@
1
-
2
- from airless.core.operator import RedirectOperator
3
- from airless.google.cloud.core.operator import GoogleBaseEventOperator
4
-
5
-
6
- class GoogleRedirectOperator(GoogleBaseEventOperator, RedirectOperator):
7
-
8
- """
9
- Operator that receives one event from a pubsub topic
10
- and publish multiple messages to another topic.
11
-
12
- It can receive 4 parameters:
13
- project: the project where the destination pubsub is hosted
14
- topic: the pubsub topic it must publish the newly generated messages
15
- messages: a list of messages to publish the topic
16
- params: a list of dicts containing a key and a list of values
17
-
18
- The output messages will be the product of messages and every param values list
19
- """
20
-
21
- def __init__(self):
22
- super().__init__()