Python Forum

Full Version: How to make a program run "online"?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
Does that service provide a webhook? If it does, you should setup a webserver (like with Flask), host it somewhere, and you're good to go.

If not, you'll need to poll that service. Run your code in a while True loop where you sleep for some duration in between checks; the less frequently you check, the less responsive it will be, but the more you check might risk overwhelming the service you're calling.
Thank you Micseydel.
So I must know Flask or Django, and knowing Python is not enough then? Did I get it correctly?
I'm not sure what webhooks I can use, I know Shopify uses an API? And on Kajabi I use a webhook. Other than that I don't know anything else, I learned about this stuff a few days ago.
At least now I know I have to "host a web server" with "flask" so there will be more reading to do. I found about Heroku today too, so I'm reading about what that is. Do I have to learn Django, that's my next question. I thought I could just upload my Python script and let it run in the cloud and that was it.