Add Python Code to Smartsheets For All Users - python

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.

Related

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

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

Upload file on Ambari Apache from local system using python

I want to upload my a csv file daily on Ambari Apache. I've tried manuplating multiple solutions avaliable online to upload files of Google and other equivalent platforms. I have also tried methods like sftp to help me achieve it, but still have not found a solution. Please recommend any tips, ideas or methods on how should I achieve it.
There is an Ambari method to do this. You can create a custom service in ambari that would run. This would enable you to have ambari self contain the code and execute it. Out of the box Ambari wouldn't technically be running the script, you'd have to run it on a Master/Slave but you might be able to work around that by running an agent on ambari and making it a slave. If it's acceptable you could just have this service installed on one slave and have it push/pull the appropriate file to Ambari.
There are others that have implemented this on just one machine and you can google for how they make sure it's run on just one machine.

Run selenium script that handles files remotely

I'm using selenium in order to extract some data (as a json file). This json is the final output of the script.
I've managed to do it locally so far in two different ways:
With a local webdriver (for Chrome).
With a Docker container.
However, I need it to be accessible from anywhere, in systems that don't have either webdrivers/Docker installed.
I have thought about deploying the script to Heroku and work around that idea, but I have no idea how to handle the data in this situation.
I think that cloud services are meant for these situations.
A storage account (S3 in Amazon or Blob Storage for Azure) allows you to acces the data from anywhere, and without almost any limitation of space, using its API or by using their SDK's.
Also you can specify access policies if your data should not be publicly accessible.
As you have already developed your script into a Docker conatiner, your are ready to run it in almost every cloud provider (for example in Amazon ECR).

Running python script from Google Apps script

I have a python script (on my local machine) that queries Postgres database and updates a Google sheet via sheets API. I want the python script to run on opening the sheet. I am aware of Google Apps Script, but not quite sure how can I use it, to achieve what I want.
Thanks
Google Apps Script runs on the server side, so it can't be used to run a local script.
you will need several changes. first you need to move the script to the cloud (see google compute engine) and be able to access your databases from there.
then, from apps script look at the onOpen trigger. from there you can urlFetchApp to your python server to start the work.
you could also add a custom "refresh" menu to the sheet to call your server which is nicer than having to reload the sheet.
note that onOpen runs server side on google thus its impossible for it to access your local machine files.

What packaging option are available for python/django

I am starting on developing a django application on a shared webhosting server(alwaysdata.com).
I would like to understand what are the packaing options available to package a django application (preferably in compiled form)
I would like to setup the source code repository on my system and build using the python packaging and deploy the package on alwaysdata.com.
I would like the option of not having to share the source code on alwaysdata.com.
Looking at pip , I am not able to find this option.
EDIT
A few more clarification: I would need the ability to not share the sourcecode since it contains the "API secret key" which I would not want to compromise. The more I look into it , the more i believe that there is no way for me to distribute binary only distribution.
I've found fabric to be a pretty nice tool for deploying Django projects. To compile your python code you can use compileall:
python -m compileall <dir>
How is this API key used? Is it a google maps api? Is it provided in scripts that go to the browser? If so, it's already out in the open, anyone using your site will see it, so you're trying to provide a $100 lock for a $0.01 piece of information. If it's a google maps api, it's not secured by keeping it hidden, but rather it's tied to a domain/directory (IIRC).
Can you share a little more what the API key is and is for, then maybe we can help you find a better solution to keep it secure.
Do you think you have to share your source code if you host your application on a 'shared hosting' provider? That's not the case. Your source code should still be private to you but the administrators of your hosting provider can get it too. Other normal Joe Users of the service shouldn't have access to your source code, or your database too. If they do, then get another shared hosting provider!

Categories