| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Python MicroServices is a Python utility to manage your Python scripts of all kinds without the hassle of creating a service for each.
You can remotely deploy them using git, then access the console to check if they are up and running. Monitor their state, automatically restart them in case of failure, log, kill, stop or restart them.
Write your Python script
Add your repository's configuration to your config.py file
Once you are connected to the console you can check your script's status with the list command
Display your script's log using the log command
Install the required python modules
pip install -r requirements.txt
You can install PythonMS as a service as root using the pythonms.service (systemd compatible)
ln -s $PWD/pythonms.service /etc/systemd/system/
Before starting to use PythonMS you must configure it. You can use the config.example.py for reference :
run={
"SMTPTester" : {"directory":"SMTPTester", "restart":False, "main_method":"main", "repository":"https://github.com/lp1dev/SMTPTester.git"},
"epitech_api_flask" : {"repository":"https://github.com/lp1dev/epitech-api-public.git", "restart": False, "main_method":"app.run", "directory":"epitechApi", "flask":{"host":"0.0.0.0", "port":8081}},
"myScript" : {"directory":"myscript_dir", "restart":True, "main_method":"run"}
}
daemon={
"port": 4242,
"host": "127.0.0.1",
"services_directory": "run",
"password": "password",
"log_file": "/var/log/pythonms.log"
}
Once you run PythonMS with the pythonms Python script, it listens on the selected port.
I'm not sure there exactly a need for a PythonMS client since the Netcat package can do everything I'd like a client to do.
That's why I recommend to use telnet or netcat to interact with your PythonMS server, for instance :
nc your_host your_port
You will then be prompted for your password, enter it
### Python Manager Hello ! (password) #> your_password
You can now use the following commands in the prompt :
| Back | FazBrowse Home | New Git URL |