Created
October 3, 2022 18:29
-
-
Save under0tech/da5eaf7eb3c4793ff7facf76a1193199 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Publish predictions fot the stock | |
def PublishPredictions(stock, day_1, day_2, day_3): | |
publisher = pubsub_v1.PublisherClient(credentials=credentials) | |
topic_path = publisher.topic_path(PUBSUB_PROJECT_ID, PUBSUB_ORACULAR_TOPIC_ID) | |
data_str = f'{stock}' | |
data = data_str.encode("utf-8") | |
publisher.publish(topic_path, \ | |
data, \ | |
stock=stock, \ | |
day_1=f'{day_1}', \ | |
day_2=f'{day_2}', \ | |
day_3=f'{day_3}') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment