runpod-python icon indicating copy to clipboard operation
runpod-python copied to clipboard

feat: implement CustomEndpoint

Open giefferre opened this issue 1 year ago • 1 comments

closes runpod/runpod-python#318

This branch adds the possibility to use the runpod-python package also with regulard Pods running on adapted Serverless templates.

To do so, a CustomEndpoint class has been created.

Usage example follows

import runpod
import time

input_payload = {
    'input': {
        'foo':'bar'
    }
}

endpoint = runpod.CustomEndpoint("https://some-runpod-host-8000.proxy.runpod.net")
run_request = endpoint.run(input_payload, timeout=90)

print("STATUS: ", run_request.status())

giefferre avatar Jun 06 '24 08:06 giefferre