python-decorator

Official

Simplify API compatibility with Python decorators.

AuthorPaddlePaddle
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill addresses the challenge of maintaining API consistency across different frameworks by using Python decorators to handle parameter name differences, ordering, and usage variations seamlessly.

Core Features & Use Cases

  • Parameter aliasing: Enables automatic mapping of parameter names between PyTorch and Paddle APIs.
  • APIs with different signatures: Supports code adaptation for APIs with varying argument orders, optional parameters, and usage patterns.
  • Use case: Developers can quickly adapt PyTorch code to Paddle by applying decorators, reducing rewrite effort and minimizing errors.

Quick Start

Apply the custom Python decorator to an API function to automatically align its parameters with the target framework's signature.

Dependency Matrix

Required Modules

None required

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: python-decorator
Download link: https://github.com/PaddlePaddle/docs/archive/main.zip#python-decorator

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.