frappe-api

Reference Frappe Python and JavaScript APIs for document operations and database queries.

21|6|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/UnityAppSuite/frappe-claude --skill frappe-api-unityappsuite
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frappe-api
Source: https://github.com/UnityAppSuite/frappe-claude/tree/main/plugins/frappe-fullstack/skills/frappe-api
Command: npx skills add https://github.com/UnityAppSuite/frappe-claude --skill frappe-api-unityappsuite

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive reference and practical patterns for using Frappe's Python and JavaScript APIs.

Core Features & Use Cases

  • Comprehensive Python API reference for document operations (get_doc, new_doc, insert, save, delete)
  • Comprehensive JavaScript API reference for client-side interactions including frappe.call and REST integrations
  • Database queries and utilities coverage (frappe.db, get_value, get_all, sql)
  • Whitelisted API definitions, error handling, and utility wrappers
  • REST API exploration including authentication, CRUD operations, and method calls

Quick Start

Provide concise, example-driven references for common Frappe API patterns to quickly build or debug document operations, database queries, and REST endpoints.

Frequently Asked Questions about frappe-api

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

FAQPage Schema
How do I use the Frappe API to create and insert documents in Python?

Use the Frappe Python API for document operations by calling new_doc, setting fields, and invoking insert. The reference covers get_doc, save, and delete with concrete code examples for server-side data access.

How do I query the database using frappe.db in Frappe?

The Frappe database API provides frappe.db methods like get_value, get_all, and sql for data retrieval. These utilities support filtering and querying documents directly in Python without raw SQL where possible.

How does frappe.call work for JavaScript API integrations?

frappe.call is the JavaScript API method for client-side REST interactions. It handles server endpoint calls, passing arguments, and managing callback responses for seamless front-end to back-end integration.

How do I define and expose whitelisted API endpoints in Frappe?

Whitelisted API endpoints in Frappe are defined using the @frappe.whitelist decorator in Python. This exposes selected methods for REST calls, handling authentication, input validation, and error management securely.

Can I use the Frappe REST API for CRUD operations and method calls?

Yes, the Frappe REST API supports CRUD operations and remote method calls. It provides authentication mechanisms and structured resource endpoints for interacting with documents and executing whitelisted functions over HTTP.

What is the best way to handle errors in Frappe API utility wrappers?

Frappe API error handling involves wrapping document operations and database queries in try-catch blocks. The reference details utility wrappers and exception management to ensure robust transaction handling and data integrity.