write-script-python3

Write Windmill Python scripts with a standard main function and TypedDict resources.

17.5k|1.1k|Updated May 5, 2022
One-click install
npx skills add https://github.com/windmill-labs/windmill --skill write-script-python3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-python3
Source: https://github.com/windmill-labs/windmill/tree/main/system_prompts/auto-generated/skills/write-script-python3
Command: npx skills add https://github.com/windmill-labs/windmill --skill write-script-python3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides developers to create Python scripts for Windmill by enforcing a consistent main function, typed resource schemas, and Windmill SDK conventions to enable reliable, reusable automation.

Core Features & Use Cases

  • Enforces a standard Python script structure with a main(param1: str, param2: int) function.
  • Provides guidance on resource typing with TypedDict, Windmill SDK usage, and patterns for preprocessor hooks, S3 helpers, and data operations.
  • Use Case: A developer builds a Windmill automation that reads a config resource, calls an external API, and returns a structured result to a flow.

Quick Start

Create a Python script following the described template, then run wmill script generate-metadata and wmill sync push to deploy.

Frequently Asked Questions about write-script-python3

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Python scripts for Windmill workflows?

Python scripts for Windmill require a standard main function with typed parameters, frontmatter metadata (name and description), and Windmill SDK imports. Use TypedDict for resource schemas and follow Windmill conventions for S3 helpers and preprocessor hooks to integrate scripts into flows and jobs.

What's the correct structure for a Windmill Python script?

A Windmill Python script must define a main function with explicit parameter types, include frontmatter with script name and description, import from the Windmill SDK, and use typing.TypedDict to define resource types. Deploy using wmill script generate-metadata and wmill sync push.

Can I use typed resources in Windmill Python automation?

Yes. Windmill Python scripts use TypedDict to define typed resource schemas, enabling reliable data workflows and API integrations. This enforces consistency across scripts and ensures resources pass correctly between flow steps.

Do I need the Windmill SDK to automate Python workflows?

The Windmill SDK is required to follow Windmill conventions for Python scripts, including access to resource handling, S3 helpers, and preprocessor hooks. It enables scripts to integrate seamlessly into Windmill flows and jobs.

How do I deploy a Python script to Windmill?

After writing your Python script with a main function and frontmatter, run wmill script generate-metadata to create metadata, then wmill sync push to deploy the script to your Windmill instance.

What are common patterns for Windmill Python scripts?

Common patterns include reading config resources, calling external APIs, returning structured results, and using S3 helpers for data operations. TypedDict typing and explicit main function signatures support reliable, reusable automation across flows.