Skip to main content

Python SDK for Poridhi Cloud Infrastructure

Project description

🌩️ Poridhi Cloud Python SDK

PyPI - Version License: MIT Platform

🧠 GPU-backed interactive environments (VSCode & Jupyter) with NVIDIA RTX 4500 — built for AI development and data science


🧭 Overview

The Poridhi Cloud Python SDK enables:

  • ⚙️ Creating & managing users
  • 🧠 Allocating GPU-powered containers for interactive coding
  • 🔍 Monitoring session status
  • 🧮 Accessing high-performance NVIDIA RTX 4500 for AI/ML tasks

🖥️ Supported Services:


📦 Installation

pip install poridhi-cloud

🚀 Quick Start

🔐 Initialize the Client
from poridhi_cloud import PoridihCloud

# Option 1: Use environment variable
client = PoridihCloud()

# Option 2: Provide API key directly
client = PoridihCloud(api_key='your-api-key-here')

🔧 Features

🧑‍💻 Create a New User

response = client.create_user()
print(response)

💻 Get Available Machines

machines = client.get_machineId()
print(machines)

🧠 Allocate a GPU Worker

🖥️ Start a VSCode or Jupyter Session

For VSCode port=8080 For Jupyter port = 8888

worker = client.codeserver(
    cpu=2,
    memory=4096,
    gpu='nvidia-rtx-4500',   # Optional (GPU model)
    port=8080,
    serviceType='vscode',    # or 'jupyter'
    duration=3600            # Optional: in seconds
)
print(worker)

💡 Both VSCode and Jupyter sessions run on NVIDIA RTX 4500


📶 Check Pod Status

status = client.podStatus(deploymentname='vscode-session-abc123')
print(status)

🔍 Essential for vscode sessions to verify if your pod is active and ready.


🔐 Authentication

You can provide your API key via:

1️⃣ Environment Variable

export PORIDHI_CLOUD_API_KEY='your-api-key-here'

2️⃣ Direct in Code

client = PoridihCloud(api_key='your-api-key-here')

⚙️ Environment Configuration

Variable Name Description
PORIDHI_CLOUD_API_KEY 🔐 API key for authentication

🚨 Error Handling

from poridhi_cloud import PoridihCloud, PoridihCloudError

try:
    result = client.get_machineId()
except PoridihCloudError as e:
    print(f"Error: {e}")

🧪 Full Example Workflow

🎯 Run Complete Session
from poridhi_cloud import PoridihCloud

# Step 1: Initialize
client = PoridihCloud(api_key='your-api-key')

# Step 2: Create user
user = client.create_user()
print("User Created:", user)

# Step 3: List available machines
machines = client.get_machineId()
print("Machines:", machines)

# Step 4: Launch VSCode or Jupyter
worker = client.codeserver(
    cpu=2,
    memory=4096,
    gpu='nvidia-rtx-4500',
    port=8080,
    serviceType='vscode',
    duration=3600
)
print("Worker Allocated:", worker)

# Step 5: Check session status
status = client.podStatus(deploymentname=worker.get('deploymentName'))
print("Pod Status:", status)

Project details


Download files

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

Source Distribution

poridhi_cloud-0.3.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

poridhi_cloud-0.3.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file poridhi_cloud-0.3.2.tar.gz.

File metadata

  • Download URL: poridhi_cloud-0.3.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for poridhi_cloud-0.3.2.tar.gz
Algorithm Hash digest
SHA256 fa65640e0efc42e75d13c8a0f49076bf8e29148d9e82e640459a67039b84c5b1
MD5 b4f7fea2a6eacb2ec33c0624f98c43ad
BLAKE2b-256 c525622d224bed736b60b7959078c280e26e978d9f2d121cd204c2e0b48cc073

See more details on using hashes here.

File details

Details for the file poridhi_cloud-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: poridhi_cloud-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for poridhi_cloud-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9ac7eedd1a0664adc0f5b41d97704b7c34638fe629e0fc867c4e60a1464bc545
MD5 9799b8846dcc76dc24adf358b0aafabf
BLAKE2b-256 ca5a2b87cb356a6b61c23888dbb22a644499d8947a245c3ce2242529d1764f63

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