frappe-api

Document Frappe Python and JavaScript APIs for document operations, database queries, and REST patterns.

48|23|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/tody-agent/codymaster --skill frappe-api-tody-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frappe-api
Source: https://github.com/tody-agent/codymaster/tree/main/skills/cm-frappe-agent/skills/frappe-api
Command: npx skills add https://github.com/tody-agent/codymaster --skill frappe-api-tody-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Frappe Python and JavaScript API reference including document operations, database queries, utilities, and REST API patterns. Use when working with frappe.get_doc, frappe.db, frappe.call, or any Frappe API methods.

Core Features & Use Cases

  • Document operations (get_doc, new_doc, save, delete)
  • Database queries (frappe.db.get_value, get_all, sql)
  • REST API patterns (CRUD endpoints, whitelisted methods)
  • Client-server utilities (frappe.call, whitelisted API, printing, messaging)
  • Example use case: build a small API endpoint to fetch customer info via frappe.get_doc and expose it through REST

Quick Start

Ask for a quick API example, such as retrieving a document with frappe.get_doc or querying the database with frappe.db.

Frequently Asked Questions about frappe-api

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

FAQPage Schema
How do I retrieve a document using the Frappe Python API?

Use frappe.get_doc within the Frappe Python API to fetch document records by specifying the doctype and name. This method loads the complete document object, allowing direct field access and modification in server-side Python scripts for application development.

How do I query the database with frappe.db in Python?

Query the Frappe database using frappe.db methods like get_value for single fields, get_all for filtered record lists, or sql for raw queries. These utilities accelerate data extraction in Python scripts without requiring manual SQL statement construction.

Can I call whitelisted Python methods from the client using frappe.call?

Yes, frappe.call enables JavaScript clients to securely invoke whitelisted Python methods on the server. This utility handles asynchronous requests, passing arguments to the target function and returning the response directly to the browser for client-side processing.

What are the REST API patterns for CRUD operations in Frappe?

Frappe REST API patterns expose standard CRUD operations through HTTP endpoints mapped to whitelisted methods. Developers send requests to resource URLs to create, read, update, and delete documents, receiving structured JSON responses for integration and client-side processing.

How do I create and save a new document using the Frappe API?

Initialize a new record using frappe.new_doc by passing the target doctype, populate its fields, and invoke the save method. This Frappe API workflow creates the document object, applies the assigned data, and commits the transaction directly to the database.

Does the Frappe API reference cover both Python and JavaScript utilities?

Yes, the Frappe API reference comprehensively covers server-side Python and client-side JavaScript utilities. It provides complete method coverage and practical examples for document operations, database queries, and REST interactions across both programming environments.