Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CPU Pod Creation Support in Python SDK #403

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AdonaiVera
Copy link

@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. 🚀

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.

1 participant