Skip to content

Conversation

AdonaiVera
Copy link
Contributor

@AdonaiVera AdonaiVera commented Mar 8, 2025

Add Pod Creation Support in Python SDK

Description

This PR introduces a basic implementation for creating pods using the Python SDK. Previously, there was no direct support for this, as noted in issue #314. I integrated a minimal version of pod creation and added a unit test to validate its functionality.

Changes Introduced

  • Implemented pod creation method in the SDK.
  • Added a unit test to verify pod creation.
  • Updated the README with instructions on how to create a pod from Python.

Testing

I tested the implementation with the following example:

import runpod

print("Creating CPU pod...")
pod = runpod.create_pod(
    name="test-cpu-pod",
    instance_id="cpu3c-2-4",
    template_id="runpod-ubuntu",
)
print(f"CPU Pod created with ID: {pod['id']}")

The output confirmed successful pod creation:

Creating CPU pod...
CPU Pod created with ID: <POD_ID>

Next Steps

  • Review the implementation to ensure it aligns with RunPod's best practices.

Let me know if you have any feedback or if there's anything else that should be added. 🚀

@deanq deanq merged commit 1a0976f into runpod:main Apr 9, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants