The project taskd
is a web service for script execution environment with workspace management. It allows you to create a workspace, upload a script, execute the script, and delete the workspace.
- Create a workspace
- Upload a script
- Execute a script
- Delete a workspace
To get the server up and running, follow these steps:
-
Install dependencies:
pip install -r requirements.txt
-
Install and run
redis-server
:- On Linux, you can install Redis using
apt-get install redis-server
and run it usingsudo systemctl start redis-server
- On Linux, you can install Redis using
-
Install and run
rq worker
:- On Linux, you can install RQ using
pip install rq
and run it usingrq worker
- On Linux, you can install RQ using
-
Run
rq-dashboard
:- On Linux, you can install RQ Dashboard using
pip install rq-dashboard
and run it usingrq-dashboard
- On Linux, you can install RQ Dashboard using
-
Run
uvicorn main:app --reload
:- On Linux, you can install Uvicorn using
pip install uvicorn
and run it usinguvicorn main:app --reload
- On Linux, you can install Uvicorn using
-
Open
http://localhost:8000/docs
for the docs
The application provides several API endpoints for managing workspaces and executing scripts. These are defined in routes.py
.
Scripts are executed in their respective workspaces. The output of the script execution is logged to a file in the workspace. This is handled by the execute_script
function in utils.py
.
For more detailed information about the application and its usage, refer to the docs.