Typescript handler functions

Does Runpod support Typescript handler functions for serverless endpoints, or only Python? We're using Runpod to accelerate scientific workloads and just shelling out to C++ binaries in the serverless function. Since the rest of our backend is Typescript it's mildly unpleasant to support Python for this single use-case.
6 Replies
Redfill The Canadien
In your docker file you set the entry point. So technically you could just run bun on deno on it. The runpod Python library, I belive, is mostly to get the data of the request. I am not sure how the library gets that data (maybe environment variables) but it should be doable in typescript Or call deno onces the python entry point as gotten the data
Josh VonFricken
Josh VonFrickenOP2mo ago
Oh so the existing Python handler is basically standing up a HTTP endpoint that Runpod then calls with the request?
Redfill The Canadien
I am not a runpod employee and I don't want to give false information. But that's what I am getting from quickly looking at the library code The simplest solution i think still using Python just for the entry and then pass the rest to typescript
Redfill The Canadien
GitHub
runpod-python/runpod at main · runpod/runpod-python
🐍 | Python library for RunPod API and serverless worker SDK. - runpod/runpod-python
Redfill The Canadien
You can find the entry point code and serverless code here
kaj
kaj2mo ago
You might want to look into the load balancing endpoint type, which doesn't need the serverless SDK and instead simply routes requests to any webserver running in a worker. https://docs.runpod.io/serverless/load-balancing/overview Something to keep in mind is load balancing endpoints don't maintain a queue, so if you need that functionality you might have to look into emulating the runpod SDK's behavior in typescript or maintain a queue elsewhere in your application
Runpod Documentation
Overview - Runpod Documentation
Deploy custom direct-access REST APIs with load balancing Serverless endpoints.

Did you find this page helpful?