Python Forum
How to make a program run "online"?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a program run "online"?
#1
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?
Reply
#2
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.
Feel like you're not getting the answers you want? Checkout the help/rules for things like what to include/not include in a post, how to use code tags, how to ask smart questions, and more.

Pro-tip - there's an inverse correlation between the number of lines of code posted and my enthusiasm for helping with a question :)
Reply
#3
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to make a Vocal synthesizer program on Python? Seadust 3 778 Jan-28-2021, 06:26 PM
Last Post: gonnach
  How to make a Python program run in a dos shell (cmd) Pedroski55 2 565 Nov-09-2020, 10:17 AM
Last Post: DeaD_EyE
  I try to make Heron formula program abcd 7 736 Oct-22-2020, 12:48 AM
Last Post: abcd
  Make a Python program executable in Windows Pedroski55 1 581 Sep-26-2020, 12:34 AM
Last Post: bowlofred
  I code a program to solve puzzle but i can't make it more dynamic. Shahmadhur13 5 1,030 Apr-18-2020, 10:05 AM
Last Post: Shahmadhur13
  how to make a program with a certain number of multiples? syafiq14 3 962 Jan-01-2020, 02:39 PM
Last Post: syafiq14
  Python Program to Make a Simple Calculator jack_sparrow007 2 7,080 Oct-19-2018, 08:32 AM
Last Post: volcano63
  Can I make this program on Python? Cergal0 8 3,474 Dec-05-2017, 01:41 PM
Last Post: buran
  Can Python make a large program with lots of gigabytes? OnisionTheOninonBoy 15 7,625 Dec-19-2016, 08:49 AM
Last Post: Skaperen
  How to I make my program release memory? Plecto 11 6,667 Dec-18-2016, 10:03 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020