How to make an application run "online"

2019-04-09 Thread Daniel Tkach
Hello group. I started learning Python about a week ago. I have a few years of 
experience with other languages, mostly Pascal and C#, and I've always 
programmed for desktop, so I'm a bit clueless when it comes to web programming.

So I was able to pull off my first working app with Python using APIs YAY!!! It 
feels so great, like I control the whole internet LOL 
What my little program does is it uses Shopify API to get the orders, then 
using a lookup table that I have on disk in a .csv file it calls a webhook on 
another platform called Kajabi where the user gets added and activated, where 
he will be watching the live videos he purchased at the Shopify website.

What I want to do now is to automate it completely, I don't want to have to run 
my script, I want the Kajabi product be activated for that user as soon as he 
checks out on Shopify and there's a new order, and I want this not to depend on 
my computer.
How do you do this? Where do I start?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to make an application run "online"

2019-04-09 Thread Daniel Tkach
Hey Chris, thank you! So by this I found https://www.pythonanywhere.com, and 
I'm checking it out! 
Good points about the "polling", I thought I could do it that way but I didn't 
know the term. I think every 30 minutes will be fine, but I'll check the 
notifications part.
Thanks again for putting me on track.

On Tuesday, April 9, 2019 at 3:05:22 PM UTC-3, Chris Angelico wrote:
> On Wed, Apr 10, 2019 at 2:46 AM Daniel Tkach  wrote:
> > What I want to do now is ... I want the Kajabi product be activated for 
> > that user as soon as he checks out on Shopify and there's a new order, and 
> > I want this not to depend on my computer.
> >
> 
> The first part of that can be done in two ways. One of them depends
> 100% on Shopify, the other doesn't. Look at Shopify's API to see if
> they have a way to receive notifications, and if so, great! Program
> against that. The other option is way less efficient. It's called
> "polling" - you set your script up to query Shopify periodically and
> see if there's anything new. You'll have to decide a balance between
> prompt reaction to orders and load on your and Shopify's servers. If
> you poll every hour, a new order may take up to an hour to be noticed
> (on average, orders will wait half an hour before they're seen).
> Depending on what you're doing, an hour might be fine; even twelve
> hours might be okay. But that's for you to decide.
> 
> The second part - having it not depend on your computer - is called
> deployment. You get some _other_ computer for it to depend on. There
> are a variety of places where you can do that, but before you decide,
> figure out what it is you need (ie solve the previous problem). There
> are a variety of commercial hosting platforms out there; as a general
> rule, you'll pay more if you want more flexibility, so the more
> restrictions you're willing to accept, the cheaper it'll be.
> 
> That's just a very broad overview, but hopefully it'll be enough to
> start researching on!
> 
> ChrisA

-- 
https://mail.python.org/mailman/listinfo/python-list