Azure Confusion - Guide to Python in Azure - Where do I start? - python

Help!
I have a small python script that logins to a website, downloads a bundle of files and then saves these files to a Sharepoint site for use by others. There are multiple files to this and several required python imports.
I'd like to move this to Azure so I can put this thing on a schedule to run periodically so I can forget about it (and have the script send notification or otherwise). Actually there are other scripts I would also like to put on a schedule.
I'm somewhat baffled in where to start doing this on Azure. I have an Azure account with some free credit but beyond that confused as what Azure service this should be built on.
Google searching is not helping as all I get is bundle of buzzwords that are not really helping.
Looking for some pointers in the right direction.
Thanks

As mentioned by #Gaurav Mantri, you can use Azure functions' Timer trigger where the function is run on a schedule. Alternatively, for codeless automated workflows, you can even opt for Azure logic apps which provide many connectors that are performed just by constructing a workflow.
REFERENCES: Connect to SharePoint from Azure Logic Apps - MSFT Docs

Related

Will Google Cloud run this type of application?

I have a python script which run 24 hours on my local system and my script uses different third party libraries that are installed using pip in python
Libraries
BeautifulSoup
requests
m3u8
My python script is recording some live stream videos from a website and is storing on system. How google cloud will help me to run this script 24/hours daily and 7days a week.I am very new to clouds. Please help me i want to host my script on google cloud so i want to make sure that my script will work there same as it is working on local system so my money will not lost .
Yes it can. I would recommend familiarizing yourself with this Quickstart: Deploy a Python Service to Cloud Run and What is Cloud Run. When you use Cloud Run, you can provide your own Docker image that uses Python, or select from preexisting images.
Once you have a Cloud Run instance running, you can tie it into other Cloud Run instances or Cloud Functions which are scalable functions that use Cloud Run under-the-hood and allow you to easily scale your app. Additionally, these instances spin down to 0 if nobody is using the app which saves costs greatly. This can be modified of course so that the app is always spun-up.
In general I highly recommend looking at Cloud Run but also other services can handle the task such as a Compute Engine.
If you want to run 24/7 application on the cloud, whatever the cloud, you must not use solution with timeout (like Cloud Run or Cloud Functions).
You can imagine using App Engine flex, but it won't be my best advice.
The most efficient for me (low maintenance, cost efficient), is to use GKE autopilot. A Kubernetes cluster managed for you, you pay only the CPU/Memory that your workloads use.
You have to containerize your app to do that.

Snapshots of a managed disk Azure

I am new to Azure and Python and would like to ask some questions. Using Azure Python SDK:
Is there a direct way for me to get a list of snapshots of a managed OS disk order by created date? As of now, I can only get all snapshots within a resource group or under a subscription.
How do I write Python SDK code to create snapshots asynchronously? I have an idea of using multi-threading, and I also want to be notified when a snapshot is successfully created.
My questions might be confusing since I have little experience with Azure and Python. Any help will be appreciated.

How to setup a webhook in Google Cloud that make the code runs in automation way

I have connection between Google Sheets and python script that I read cells from a column then read these cells's data and then run the code to do its job.
So basically, what I want to do is setting up a webhook or anything that Make the code runs always and catching a new data in the google sheet.
I made some searches I got 3 Apps can do this but I don't know which one is suitable
1- Cloud Run
2- Cloud Build API
3-Cloud Deploy
and how to setup the the webhook, pretty appreciate
Cloud Scheduler is a fully managed cron job scheduler. It allows you to schedule virtually any job. You can automate everything, including retries in case of failure to reduce manual toil and intervention. Cloud Scheduler even acts as a single pane of glass, allowing you to manage all your automation tasks from one place.

Where to run online Python 3.8 script

I have a folder with different folders in it.
In one of the folder I have a python script.
The python script reads an excel file (which is in the same folder), scrapes information from the internet, updates the excel file and creates another excel file in the main directory.
My question is:
As I can't run my computer non stop, I imagine it's possible (easy? and free) to upload all my folders on a website which will allow me to run my python (3.8) script. Do you have any suggestions ? Which website could be appropriate ? Pythonanywhere.com ?
Plus, I'd like to run this script every morning at 6am.
Thank you for your answers ! :)
Yes, you could use PythonAnywhere -- free accounts allow you to create one scheduled task, which can run once a day. If you have an account, you can set it up on the "Tasks" page.
Some public cloud providers, such as GCP, AWS, and Azure, offer free tier VMs. Simply run the code on those and set up a cron job. Though the network usage probably still costs you a few cents a month, this is a very cheap way to go. You could also consider setting up a FaaS solution against very low cost.
As #Klaus said, this is not a programming question. If you are on linux you can use crontab to schedule your process.
crontab
And if you want to run it on the cloud you can use free services like Heroku

Add Python Code to Smartsheets For All Users

I've developed a Python script that helps track and organize various tasks in Smartsheet but I want to assign it to a button inside of the Smartsheet such that it is available for multiple users. Is there a way to do this and could someone provide some documentation? Thus far I haven't seen anything online.
Thank you,
Sam
Smartsheet doesn't host scripts, nor does it natively have a way to execute your remote scripts. You'd need to either host it yourself or host it on a cloud platform like AWS or Azure. Inside Smartsheet, you could create a dashboard widget that then links to your own server.

Categories