python-sdk
Build AI applications with the inference.sh Python SDK.
Works with
0
total installs
0
this week
300
GitHub stars
0
upvotes
Install Skill
Run in your terminal
0
installs
0
this week
300
stars
Installation Guide
How to use python-sdk on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your machine
- ›Node.js 16+ with npm — verify with
node --version - ›Active project directory where you want to add
python-sdk
Run the install command
Execute the skills CLI command in your project's root directory to begin installation:
Fetches python-sdk from inference-sh/skills and configures it for Cursor.
Select Cursor when prompted
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate python-sdk. Access via /python-sdk in your agent's command palette.
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Documentation
Python SDK
Build AI applications with the inference.sh Python SDK.

Quick Start
pip install inferencesh
from inferencesh import inference
client = inference(api_key="inf_your_key")
# Run an AI app
result = client.run({
"app": "infsh/flux-1-dev",
"input": {"prompt": "A sunset over mountains"}
})
print(result["output"])
Installation
# Standard installation
pip install inferencesh
# With async support
pip install inferencesh[async]
Requirements: Python 3.8+
Authentication
import os
from inferencesh import inference
# Direct API key
client = inference(api_key="inf_your_key")
# From environment variable (recommended)
client = inference(api_key=os.environ["INFERENCE_API_KEY"])
Get your API key: Settings → API Keys → Create API Key
Running Apps
Basic Execution
result = client.run({
"app": "infsh/flux-1-dev",
"input": {"prompt": "A cat astronaut"}
})
print(result["status"]) # "completed"
print(result["output"]) # Output data
Fire and Forget
task = client.run({
"app": "google/veo-3-1-fast",
"input": {"prompt": "Drone flying over mountains"}
}, wait=False)
print(f"Task ID: {task['id']}")
# Check later with client.get_task(task['id'])
Streaming Progress
for update in client.run({
"app": "google/veo-3-1-fast",
"input": {"prompt": "Ocean waves at sunset"}
}, stream=True):
print(f"Status: {update['status']}")
if update.get("logs"):
print(update["logs"][-1])
Run Parameters
| Parameter | Type | Description |
|---|---|---|
app |
string | App ID (namespace/name@version) |
input |
dict | Input matching app schema |
setup |
dict | Hidden setup configuration |
infra |
string | 'cloud' or 'private' |
session |
string | Session ID for stateful execution |
session_timeout |
int | Idle timeout (1-3600 seconds) |
File Handling
Automatic Upload
result = client.run({
"app": "image-processor",
"input": {
"image": "/path/to/image.png" # Auto-uploaded
}
})
Manual Upload
from inferencesh import UploadFileOptions
# Basic upload
file = client.upload_file("/path/to/image.png")
# With options
file = client.upload_file(
"/path/to/image.png",
UploadFileOptions(
filename="custom_name.png",
content_type="image/png",
public=True
)
)
result = client.run({
"app": "image-processor",
"input": {"image": file["uri"]}
})
Sessions (Stateful Execution)
Keep workers warm across multiple calls:
# Start new session
result = client.run({
"app": "my-app",
"input": {"action": "init"},
"session": "new",
"session_timeout": 300 # 5 minutes
})
session_id = result["session_id"]
# Continue in same session
result = client.run({
"app": "my-app",
"input": {"action": "process"},
"session": session_id
})
Agent SDK
Template Agents
Use pre-built agents from your workspace:
agent = client.agent("my-team/support-agent@latest")
# Send message
response = agent.send_message("Hello!")
print(response.text)
# Multi-turn conversation
response = agent.send_message("Tell me more")
# Reset conversation
agent.reset()
# Get chat history
chat = agent.get_chat()
Ad-hoc Agents
Create custom agents programmatically:
from inferencesh import tool, string, number, app_tool
# Define tools
calculator = (
tool("calculate")
.describe("Perform a calculation")
.param("expression", string("Math expression"))
.build()
)
image_gen = (
app_tool("generate_image", "infsh/flux-1-dev@latest")
.describe("Generate an image")
.param("prompt", string("Image description"))
.build()
)
# Create agent
agent = client.agent({
"core_app": {"ref": "infsh/claude-sonnet-4@latest"},
"system_prompt": "You are a helpful assistant.",
"tools": [calculator, image_gen],
"temperature": List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
ai-video-generation
5inference-sh/skills
python-expert-best-practices-code-review
33wispbit-ai/skills
fastapi-python
26mindrally/skills
python-expert
11shubhamsaboo/awesome-llm-apps
flask-python
7mindrally/skills
python-odoo-cursor-rules
6mindrally/skills
Reviews
- PPratham Ware★★★★★Dec 28, 2024
We added python-sdk from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- LLucas Zhang★★★★★Dec 28, 2024
python-sdk fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- IIsabella Li★★★★★Dec 28, 2024
python-sdk reduced setup friction for our internal harness; good balance of opinion and flexibility.
- EEmma Shah★★★★★Dec 24, 2024
Useful defaults in python-sdk — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- NNeel Bansal★★★★★Dec 20, 2024
python-sdk is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- NNia Harris★★★★★Dec 12, 2024
python-sdk is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- AAnaya Wang★★★★★Nov 23, 2024
python-sdk has been reliable in day-to-day use. Documentation quality is above average for community skills.
- YYash Thakker★★★★★Nov 19, 2024
python-sdk fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- IIsabella Kim★★★★★Nov 19, 2024
We added python-sdk from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ZZara Agarwal★★★★★Nov 19, 2024
python-sdk is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 74
Discussion
Comments — not star reviews- No comments yet — start the thread.