python-script-generator

生成专业的 Python 脚本和应用模板,支持 CLI 工具、Flask API、FastAPI、Django Command、Scraper 等,一键生成完整项目代码。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "python-script-generator" with this command: npx skills add Sunshine-del-ux/python-script-generator

Python Script Generator

快速生成专业的 Python 脚本和应用代码。

功能

  • ⚡ 一键生成项目
  • 📝 支持多种类型
  • 🔧 完整的项目结构
  • 📖 最佳实践

支持的类型

类型说明适用场景
cli命令行工具自动化脚本
flaskFlask API轻量级 Web 服务
fastapiFastAPI高性能 API
django-cmdDjango CommandDjango 管理命令
scraper网页爬虫数据采集
botTelegram/Discord Bot机器人开发

使用方法

CLI 工具

toolpython-script-generator my --type cli
python-script-generator backup-script --type cli --description "Backup important files"

FastAPI

python-script-generator myapi --type fastapi
python-script-generator rest-api --type fastapi --crud

爬虫

python-script-generator scraper --type scraper
python-script-generator news-collector --type scraper --selector ".article"

Bot

python-script-generator mybot --type bot --platform telegram

生成的项目结构

mytool/
├── mytool/
│   ├── __init__.py
│   └── main.py
├── tests/
│   └── test_main.py
├── requirements.txt
├── setup.py
└── README.md

CLI 模板

#!/usr/bin/env python3
import argparse
import sys

def main():
    parser = argparse.ArgumentParser(
        description='Your CLI tool description'
    )
    parser.add_argument(
        '--name', 
        default='World',
        help='Name to greet'
    )
    parser.add_argument(
        '-v', '--verbose',
        action='store_true',
        help='Enable verbose output'
    )
    
    args = parser.parse_args()
    
    if args.verbose:
        print(f'[DEBUG] Greeting {args.name}')
    
    print(f'Hello, {args.name}!')

if __name__ == '__main__':
    main()

FastAPI 模板

from fastapi import FastAPI, HTTPException
from pydantic import BaseModel

app = FastAPI(
    title="My API",
    description="API description",
    version="1.0.0"
)

class Item(BaseModel):
    name: str
    description: str = None
    price: float

@app.get("/")
async def root():
    return {"message": "Hello, World!"}

@app.post("/items/")
async def create_item(item: Item):
    return item

安装依赖

# CLI
pip install argparse

# FastAPI
pip install fastapi uvicorn

# Flask
pip install flask

# Scraper
pip install requests beautifulsoup4

变现思路

  1. 脚本模板销售 - 专业脚本模板
  2. 定制开发 - Python 开发服务
  3. 培训课程 - Python 编程培训
  4. SaaS 工具 - 在线工具平台

安装

# 无需额外依赖

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

CLI Scaffold Generator

生成专业 CLI 脚手架,支持 Commander.js, yargs, oclif 等主流 CLI 框架,一键生成完整项目结构。

Registry SourceRecently Updated
0186
Profile unavailable
Coding

Skill Scaffold

AI agent skill scaffolding CLI. Create skills for OpenClaw, Moltbot, Claude, Cursor, ChatGPT, Copilot instantly. Vibe-coding ready. MCP compatible.

Registry SourceRecently Updated
13K
Profile unavailable
Security

AetherCore v3.3

AetherCore v3.3.4 - Security-focused final release. High-performance JSON optimization with universal smart indexing for all file types. All security review...

Registry SourceRecently Updated
1144
Profile unavailable