Skip to main content

Official Python library for RunPod API & SDK.

Project description

RunPod | Python Library

CI | Code Quality   CI | Unit Tests

Official Python library for RunPod API & SDK.

Table of Contents

Installation

pip install runpod

API Language Library

When interacting with the RunPod API you can use this library to make requests to the API.

import runpod

runpod.api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

SDK - Serverless Worker

This python package can also be used to create a serverless worker that can be deployed to RunPod.

Quick Start

Create an python script in your project that contains your model definition and the RunPod worker start code. Run this python code as your default container start command:

import runpod

MODEL = 'YOUR_MODEL'

def run(job):
    # Your inference code here
    return MODEL.predict(job.input)

runpod.serverless.start({"handler": run})

Add the env variables found in serverless-worker to your project.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

runpod-0.6.5.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

runpod-0.6.5-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file runpod-0.6.5.tar.gz.

File metadata

  • Download URL: runpod-0.6.5.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for runpod-0.6.5.tar.gz
Algorithm Hash digest
SHA256 5c6fd02187d910e8cc60f19e2ad0839efaaa963743c3e58c230d97d1a5c760f6
MD5 010b1f6631a81cde6c7831906940f7cf
BLAKE2b-256 b8cbc48416295f7bd0aab5d82a641d32a33d20978a20735044018a6728fdfb12

See more details on using hashes here.

File details

Details for the file runpod-0.6.5-py3-none-any.whl.

File metadata

  • Download URL: runpod-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for runpod-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 961b003e88480a9c09e5a918e526f4728ef381b2d492c48e392bcbf3ff74b8a2
MD5 ef6f8ca5090dec0666a68e2b8d474232
BLAKE2b-256 9667ea88e1e00a6dbc812f966add63c0433500ed646e3a890e7cd6876b392b68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page