Update an agent
import swarmnode
swarmnode.api_key = "YOUR_API_KEY"
swarmnode.Agent.update(
id="15d19ca3-26f1-4adb-9cea-3955b73d9b4e",
name="Updated name",
script="def main(request):\n return 'Hello!'",
requirements="requests==2.31.0",
env_vars="FOO=bar",
python_version="3.10",
)
The following fields can be updated: name
, script
, requirements
, env_vars
, python_version
.
Returns a Agent
object.