# Python Inline Scripts

> Guide for running inline Python scripts with uv. This should be used when the user says "use inline python Use when this capability is needed.

- Skill: `tomevault-io/python-inline-scripts` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/python-inline-scripts`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/python-inline-scripts/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/python-inline-scripts

---


## Python Inline Scripts with uv

### IMPORTANT

- NEVER add stdlib modules like json, os, re, etc. to dependencies OR THE SCRIPT WILL FAIL
- ALWAYS assume Python 3.12+

### Example

```bash
uv run --no-project -q --script - < <(cat <<'EOF'
# /// script
# # ONLY add dependencies array if you need PyPi packages
# dependencies = [
#   "httpx"
# ]
# requires-python = ">=3.12"
# ///

import httpx
print(httpx.get("https://api.github.com/zen").text)
EOF
)
```

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/jahands) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

