Can't select Web Job on Azure - python

I'm trying to create a Web Job on Azure (I have a student account) but the option is greyed out whenever I create a Web App, does anyone know why? I'm aiming to host a Discord bot I wrote on there, although it uses various Python packages and SQLite3 so I'm not sure if it'd even work. If anyone has any other hosting alternatives I'd appreciate suggestions!

WebJob feature is only support in Azure WebApp for Windows, not for Linux on Container.
Also note that Student Subscription will have limited services enabled.

Related

Host a python script on web server and get its output for further use

I have a unity AR application that needs to run a python script on some event. What I want to do is to host the script on a cloud server, run the script on event from my AR app and use the results generated by python script for future use. I have seen people recommend Ironpython but its not what I need. And according to this answer the best way to do this by a cloud hosting.
I have researched it a lot and have found that it is done by making a docker container and then hosting the container to web server. Is this the right way? or can it be done in some other easier work around? The most important part is to trigger that python script from and unity app event and its results should be returned to the app so that it can be used further. Is this doable?
I have never run (or even hosted) a python script over any server and have no basic knowledge of doing it. It would be of great help if anyone could tell me how to do this. Which cloud server would be the best for it and would that server be paid?
This is for my Final year project purpose, any sort of help will be great. Thanks
Cloud hosting, probably digitalocean? Cheap and efficient, definetly paid server however check in if you can use Heroku somehow?.

Vsphere API Script for getting Information

I am playing with the vSphere API and it worked good over the Web Interface, now I would like to write a Python Script that communicates with the API and give me some answers to my question like how many VM´s do I have in my Environment or which VM is currently running, for that I need to pass my Username and password to enter the vCenter, and ask the vCenter this questions, have somebody already did it this? and have the code for me or somebody a idea for fixing this problem?
Are you using an SDK to connect to the vCenter server?
vSphere Automation SDK for Python guide - Authentication: https://code.vmware.com/docs/7327/vmware-vsphere-automation-sdks-programming-guide-6-7-update-1#/doc/GUID-FBE84F97-5AAC-4D08-9727-299CCC22C300.html
pyvmomi SDK - Sample to retrieve VMs: https://github.com/vmware/pyvmomi-community-samples/blob/master/samples/get_vm_names.py
Here's a sample to use Python to interact directly with the REST service, instead of an SDK: https://blog.dchidell.com/2016/11/23/vcenter-6-5-rest-api-w-python/

Running One Instance of Google App Engine with frontend in nodejs and backend server in python

I'm getting my feet wet with GCP and GAE, also nodejs and python and networking (I know).
[+] What I have:
Basically I have some nodejs code that takes in some input and is supposed to then send that input to some python code that will do more stuff to it. My first idea was to deploy the nodejs code via GAE, then host the python code in a python server, then make post requests from the nodejs front-end to the python server backend.
[+] What I would like to be able to do:
just deploy both my nodejs code and my python code in the same project and instance of GAE so that the nodejs is the frontend that people see but so that the python server is also running in the same environment and can just communicate with the nodejs without sending anything online.
[+] What I have read
https://www.netguru.co/blog/use-node-js-backend
Google App Engine - Front and Backend Web Development
and countless other google searches for this type of setup but to no avail.
If anyone can point me in the right direction I would really appreciate it.
You can't have both python and nodejs running in the same instance, but they can run as separate services, each with their own instance(s) inside the same GAE app/project. See Service isolation and maybe Deploying different languages services to the same Application [Google App Engine]
Using post requests can work pretty well, but will likely take some effort to ensure no outside access.
Since you intend to use as frontend the nodejs service you're limited to using only the flexible environment for it, which limits the inter-service communication options - you can't use push queues (properly supported only in the standard environment) which IMHO would be a better/more secure solution than post requests.
Another secure communication option would be for the nodejs service to place the data into the datastore and have the python service pick it up from there - the datastore is shared by all instances/versions/services inside the same GAE app. Also more loosely coupled IMHO - each service can function (at least for a while) without the other being alive (not possible if using the post requests).
Maybe of interest: How to tell if a Google App Engine documentation page applies to the standard or the flexible environment
UPDATE:
Node.JS is currently available in the standard environment as well, so you can use those features, see:
Now, you can deploy your Node.js app to App Engine standard environment
Google App Engine Node.js Standard Environment Documentation

Python/Google Apps Script integration

Would it be possible for some type of Python script to check services running on a linux box, and integrate with a google app script, so it would then populate a google doc spreadsheet stating whther a service is running or not ?
Yes. You would need to authorize it the first time and implement oAuth from the script though. I strongly suggest that you switch to the Google Drive API.

RESTful Web service or API for a Python program in WebFaction

I have developed a few python programs that I want to make available online.
I am new to web services, and I am not sure what I need to do in order to create a service where somebody makes a request to an URL (for example), and the URL triggers a Python program that displays something in the user's browser, or a set of inputs are given to the program via browser, and then python does whatver it is supposed to do.
I was playing with the google app engine, which runs fine with the tutorial, and was planning to use it becuase it looks easy, but the problem with GAE is that it does not work well (or does not work at all) with some libraries that I plan to use.
I guess what I am trying to do is some sort of API using my WebFaction account.
Can anybody point me in the right directions? What choices do I have in WebFaction? What are the easiest tools available?
Thank you very much for your help in advance.
Cheers
Well, your question is a little bit generic, but here are a few pointers/tips:
Webfaction allows you to install pretty much anything you want (you need to compile it / or ask the admins to install some CentOS package for you).
They provide some default Apache server with mod_wsgi, so you can run web2py, Django or any other wsgi frameworks.
Most popular Python web frameworks have available installers in Webfaction (web2py, django...), so I would recommend you to go with one of them.
I would also install supervisord to keep your service running after some reboot/crash/problem.
I would be glad to help you if you have any specific question...

Categories

Resources