Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
xpander
Sep 2, 2004

funny Star Wars parody posted:

Ok here's a dumb question: I want to make a unicornhat (which uses a Python library) on a raspberry pi do something when a new order is placed, and according to the Shopify API, you would use their webhook to do it and you supply them with the URL for the webhook to deliver a HTTP POST payload to in json format.

I understand the concept of json stuff after working with the discord API but I've never worked with webhooks before, so correct me if I'm wrong but does that mean I have to have my own server running and listening for the HTTP POST payload? Since it's a raspberry pi would it be easier to try to sniff for like an email notification to trigger the light_sign action?

Any pointers would be great, I'm doing this for a friend's company in exchange for some of the neat t-shirts that he sells so I'd really like to find a way to make it work that doesn't take me a million years to figure out

Echoing the other replies that Flask/Django are perfect for this. On the operational side, check out Zappa for some sweet serverless action. This will let you use some AWS services(API Gateway, Lambda) to run the application code without having to keep a server online. You'll fall well within the free tier for development usage, and probably well into their production load as well.

Adbot
ADBOT LOVES YOU

xpander
Sep 2, 2004

Thermopyle posted:

Thanks for reminding me about Zappa. I keep meaning to try it out on my next project and then forget.

edit: oh yeah now I remember why I really haven't tried it. No Python 3 support. :(

Well, the real problem is that Lambda doesn't have Python 3 support. It's pretty annoying, but for some projects, might work fine.

xpander
Sep 2, 2004
We were talking about Zappa and Lambda a few pages ago, and Thermopyle had mentioned that a lack of Python 3 support was the real thing holding him back from starting new projects with it. That's now been remedied: https://aws.amazon.com/about-aws/whats-new/2017/04/aws-lambda-supports-python-3-6/.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply