This is a python server using flask and basic auth to restart plex on a local machine (running windows) from an http request
- Python 3.x
- pip
requirements.txt generated with: (inside myEnv)
pip freeze > requirements.txt
-
Clone the project and navigate to the directory in your terminal.
-
Create a virtual environment and activate it:
python -m venv myEnv
source myEnv/bin/activate (Linux or MacOS)
myEnv\Scripts\activate (Windows)
- Install the dependencies:
pip install -r requirements.txt
- Run the server
python server.py To exit the virtual environment use the command deactivate
example request:
curl -u admin:password -X POST -H "Content-Type: application/json" -d '{"command": "start"}' http://{your_server_address}:{your_server_port}/