Can I write a service in Python or Node.js and be able to run it as a service on different platforms without installing python or node.js on that machine?
Let us say I have a installer that installs my application, while installing the application it will also tell that it will install a service. This service will auto start on system boot. It should work on windows,osx, and linux. The service will just watch a directory for file changes and make appropriate actions with it.
I have seen easy to implement packages for python and node.js that can do this watching and are also already cross platform but both needs the user to install and setup the python or node.js package first. (or is there a way to not need to install python/node.js?)
So what are the possible solutions to:
User is not technical so should not install node.js/python distributions
Have a service that gets installed with the client on windows/osx/linux
Have the service bootup on start up
Or should I write a service in C++ and build each for each platforms? If that’s the case is there any package that I can use for such task? (I have to do appropriate task for each thing that happens so I can't use prebuilt services)
This problem is more of a windows and osx problem than linux.
Related
I have created one project which has machine learning and Signal processing functionality.
This project is running on server without any issue. My android device making API call to server and getting response.
I want this functionality to be run offline (Without Internet) without calling to remote API.
What are the possible way to run to Python functionality in the Android application?
Writing entire application in Java is not feasible because it depends on many python libraries like numpy, scipy, pandas, sklearn etc.
Maybe you can use Termux which is an Android terminal emulator and Linux environment app.
It comes with a package manager pkg which can be used to install Python.
pkg install python # or python2
It installs python and the pip package manager.
You can also find some useful information in wiki.python.org/moin/Android.
You can try Chaquopy, it allows intermixing of Python, Java and Kotlin. Furthermore it allows the use of cheeseshop (PyPi) packages such as the one you described.
You should be able to integrate your existing code with a Java application for Android.
https://chaquo.com/chaquopy/
It requires a commercial license if you don't want to opensource your code.
It is possible to use python for android project https://github.com/kivy/python-for-android. For rooted device or system app it is possible to launch python interpreter (compiled binaries) as a separate process with script as a parameter
I develop a distributed application which is based on RabbitMQ and multiple python applications. System is pretty complex so it is very likely that we will need to update deployed solution multiple times. Customer wants that we use his servers which are running windows. So the question is how to deploy and update python part of this system. And as sub-question is it better to deploy sources or use pyinstaller to get executables and then deploy them? On my test server I just use git pull when I have some changes which is probably not the case for production system.
I was in a similar position and i combine pyinstaller with fabric. So i build a "compile" version of the project and with fabric, i deploy like the client wants.
Fabric support roles definition, several configuration for several clients.
I have developed a web-based application for end-users that resides in a docker container. The container itself hosts a few python dependencies, a few public repositories, and a flask based web front-end with a MongoDB back-end that is started when the container is initialized.
It's fairly straightforward to download the container and run it on a docker host. However, most docker hosts (if not all) are not free.
Therefore, if an end-user wanted to use my application off the cloud they would have to download and install docker and associated dependencies on their local machine prior to being able to use the image (which is even more complicated on a system like Windows or Mac OSX)
With that being said, my question is: Is there any tool that has been developed to help ease this requirement on the end-user for deployment to users local desktop environments? I understand installing and using docker is not THAT hard, but some people are still very afraid of command-lines and I was hoping to find a method that would help alleviate some of these 'scary' requirements.
Did you look at Boot2Docker? It packages up the Docker CLI compiled for Windows or OSX, a VirtualBox VM to run Linux for the containers, with an easy-to-use installer.
Also https://kitematic.com adds more point-and-click for Mac users.
Overall, however, Docker is a developer/devops tool, and I haven't seen much aimed at helping non-technical folks use it.
I have a Linux web application which installs a webserver, a database, digital certificates etc using a set of .sh scripts.
In order to simplify user interaction during installation such as entering passwords, certificate details and such, I want to create a GUI installer. After much deliberation, following are some decisions and related questions
The target systems may or may not have a Desktop or a monitor installed. So providing a web interface to the install process may be the way to go. User would copy the application to the target machine, start the webservice which would then expose a web interface to continue the install. Would Python be a good choice for this?
Since this is an installer itself, the requirements to run it must be practically nil. This requires
Use python's built in SimpleHTTPServer. This will be used the one time during installation and then be killed. Any caveats to using the default python web server?
Compile app into standalone binary using one of the Freezing utilities. We don't want to depend on the user having python on their system and have been asked to account for admins who've removed python due to whatever reason. Is this precaution necessary?
Any comments on the general approach or alternative options will be greatly appreciated.
I'm writing a web application in Python, intended for use by teachers and pupils in a classroom. It'll run from a hosted website, but I also want people to be able to download a self-contained application they can install locally if they want more performance or they simply won't have an Internet connection available in the classroom.
The users aren't going to be able to manage instructions like "first install Python, then install dependencies, download the .tar.gz archive and type these commands into the command line...". I need to be able to create an all-in-one type installer that can potentially install Python, dependencies (Python-LDAP), some Python code, and register a Python-based web server as a Windows Service.
I've had a look through previous questions, but none quite seem relevant. I'm not concerned about the security of source code (my application will be open source, I'll sell content to go with it), I just need non-technical Windows users to be able to download and use my application with no fuss.
My current thoughts are to use NSIS to create an installer that includes Python and Python-LDAP as MSIs, then registers my own simple Python-based web server as a Windows service and puts a shortcut in the start menu / on the desktop linking to http://localhost. Is this doable with NSIS - can NSIS check for currently installed copies of Python, for instance? Is there a better way of doing this - is there a handy framework available that lets me shove my code in a folder and bundle it up to make an installer?
Using NSIS is great (i use it too) but i would suggest using a "packager" like pyinstaller (my personal fav, alternatives bb_freeze, py2exe) to create an exe before the using NSIS
The primary benefit you get by doing this is;
Your download is smaller as you're not bundling the whole Python Standard Lib and extra stuff your app wont need and you get an exe file to boot!
You can try the Bitnami Stack for Django that includes Apache, MySQL,Python, etc in an all-in-one installer. It is free/open source