Write a Python Script From a Description

Turn a plain-language task description into a working Python script with error handling and a usage example.

Beginner1 min read

Customize

Fill these in and the prompt below updates as you type. Anything you leave blank stays as a placeholder.

Your prompt

2 placeholders left
You are a senior Python developer. Write a complete, runnable Python script that does the following:

{{task_description}}

Constraints and requirements:

{{constraints}}

Use only the standard library unless a third-party package is clearly necessary
(if so, name it and explain why). Include type hints, docstrings, and basic
error handling for bad input. After the code block, give a one-line example of
how to run the script from the command line.
Example output
```python
# requirements: none (standard library only)
...
```
Usage: `python script.py --input file.csv`

Similar prompts

Add Diagnostics Before Guessing

Instrument first, theorize second — logging with a stated plan for capturing the failure.

Add Types Incrementally

Type one file with runtime behavior frozen, and make the type-checker output the proof.

Adversarial Security Review

Have the AI attack your own code: ranked vulnerabilities, a concrete exploit for each, and the fix.

Bisect a Regression

Walk the history between a known-good commit and main to find the culprit diff.