Send data from Cloud Functions to PubSub in Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024

ความคิดเห็น • 22

  • @andrewbateman2282
    @andrewbateman2282 3 ปีที่แล้ว +2

    You've done it again, a great tutorial and the code works out of the box. Fantastic.

    • @d-i-ry
      @d-i-ry  3 ปีที่แล้ว +1

      Thanks again!!

  • @nestorviloria6880
    @nestorviloria6880 ปีที่แล้ว +2

    Awesome tutorial. Thanks for sharing. All the best.

    • @d-i-ry
      @d-i-ry  ปีที่แล้ว

      Hey Nestor, glad you liked it! Thanks for the comment :)

  • @onelastmarine
    @onelastmarine ปีที่แล้ว

    really enjoyed your video I am new to this and looking at these topics as part of my summer internship. really helpful and would love to see more about topics like this maybe even a little longer and more explanation into how everything functions and why you do stuff the way you do it.

    • @d-i-ry
      @d-i-ry  ปีที่แล้ว

      I'm so glad!

  • @Mr.Alnajar
    @Mr.Alnajar 2 ปีที่แล้ว +1

    Is it possible to do the cloud function in Nodejs and use firebase real time database as a trigger on write?

    • @d-i-ry
      @d-i-ry  2 ปีที่แล้ว

      Hey Al, here you go :) an example of a NodeJS cloud function cloud.google.com/functions/docs/writing#functions-writing-helloworld-http-nodejs

  • @hongwenli541
    @hongwenli541 2 ปีที่แล้ว

    how to test background cloud functions on local environment?

    • @d-i-ry
      @d-i-ry  2 ปีที่แล้ว

      Hi Mike,
      I want the same, but the documentation isn't very complete yet

  • @AshishGannapuram
    @AshishGannapuram ปีที่แล้ว

    hi can i run python code in an aws ec2 instance to publish a message from AWS to gcp pub-sub topic

    • @d-i-ry
      @d-i-ry  ปีที่แล้ว

      Hi Ashish, yeah you can publish from anywhere - you can use my code to run from anywhere you like

    • @AshishGannapuram
      @AshishGannapuram ปีที่แล้ว

      @@d-i-ry iam unable to publish a message from aws ec2 instance to pubsub topic could you help me with that please

    • @AshishGannapuram
      @AshishGannapuram ปีที่แล้ว

      @@d-i-ry i have tried to send from ec2 instance using python code, enabled cloud pubsub API and downloaded credentials.json file also could you help me with that

    • @d-i-ry
      @d-i-ry  ปีที่แล้ว +1

      ​@@AshishGannapuram Sorry, but I don't use AWS. ive just googled the issue, and it looks like AWS-to-Google Cloud for PubSub isn't a very common solution for people to work with.
      I rarely suggest this, but in this instance, I'd say if it's possible for you to look into a different solution, I certainly would.
      It's just so much nicer (and safer and easier and more helpful for future use) to work in an environment that's common among programmers rather than trying to piece 2 very dissimilar technologies together

    • @AshishGannapuram
      @AshishGannapuram ปีที่แล้ว

      @@d-i-ry ok thanks for the input

  • @tarushkhatri681
    @tarushkhatri681 2 ปีที่แล้ว

    Nice Video. But I am facing response 403 when calling my cloud function through python program. (calling python program in google cloud shell)

    • @d-i-ry
      @d-i-ry  2 ปีที่แล้ว +1

      Hi Tarush, thank you!
      The 403 error means access is forbidden, so I'd try regenerating your Service Account's JSON token. Let me know if that works, and try using very broad permissions just to see if that works. Once it does work, you can restrict your permissions to just the minimum that your script needs.

  • @husseinalsayed7566
    @husseinalsayed7566 2 ปีที่แล้ว

    amazing videos... thanks for the time you put on this.
    I got stuck on a project that i'm working on and after doing some reading it looks like I need Pub/Sub to proceed... I hope you can give me some hints to do what i'm trying to do.
    or if you can make video turorial that would be amazing.
    I'm trying to do something whenever the email (XXX) receives calendar invite... I tried to work with Pub/Sub 2 months ago until I gave up... but now I watched your videos and they seems to clear thing up on what Pub/Sub actually does.
    I'm using Flask BTW :)

    • @d-i-ry
      @d-i-ry  2 ปีที่แล้ว +1

      Hi Hussein, thanks so much! My next video is going to be pubsub to email (a pubsub message triggers an alert and an email will be sent out with that alert). What are you stuck on or trying to do?

    • @husseinalsayed7566
      @husseinalsayed7566 2 ปีที่แล้ว

      @@d-i-ry thank a lot, what I’m trying to do is to have my script gets triggered whenever I received a new email/meeting invite

    • @d-i-ry
      @d-i-ry  2 ปีที่แล้ว

      @@husseinalsayed7566 oooooh, I understand now. You'll have to write a separate script that monitors your mail, and then that script will make a call to PubSub. I don't know how to do that, but I can tell you that how you write it is going to depend entirely on how your mail is setup (who your mail provider is, if you leave a copy of the messages on your server, etc)