Appearance
v15 Stable Searchable API Index
Exhaustive alphabetical reference index of all public functions, methods, hooks, decorators, CLI commands, and utility APIs in Frappe Framework v15 with direct links to their detailed documentation and code examples.
A
_()— Multilingual translation function wrapper.add_days()— Add or subtract N days from date string (Server API).add_months()— Add or subtract N months from date string (Server API).add_to_date()— Add date/time intervals to target date.add_years()— Add or subtract N years from date string.after_delete()— Controller lifecycle hook executed after database row deletion.after_insert()— Controller lifecycle hook executed immediately after initial DB row insertion.after_job— Background RQ job completion middleware hook inhooks.py.after_request— HTTP request completion middleware hook inhooks.py.app_include_css— Include global custom CSS bundle in Desk interface.app_include_js— Include global custom JS bundle in Desk interface.autoname()— Custom document primary key generator controller method.
B
before_change()— Controller hook executed prior to document state modification.before_insert()— Controller hook executed right before initial databaseINSERT.before_job— Background RQ job pre-execution middleware hook.before_naming()— Controller hook executed immediately beforeautoname()resolution.before_request— HTTP request pre-processing middleware hook.before_save()— Controller hook executed right before SQLINSERT/UPDATEwrite.before_submit()— Controller hook executed prior to document submission checks.before_trash()— Controller hook executed prior to starting document deletion.bench backup— Backup site database, public files, and private attachments.bench build— Compile static frontend assets (JS/CSS) using Esbuild.bench clear-cache— Flush Redis site cache, session keys, and Jinja web pages.bench console— Launch interactive IPython REPL pre-loaded with Frappe site context.bench doctor— Monitor status of Redis queues, workers, and background jobs.bench drop-site— Delete a site directory and drop its associated MariaDB/PostgreSQL database.bench execute— Run Python dotted path function directly from CLI terminal.bench export-fixtures— Export JSON fixtures configured inhooks.pyinto application directory.bench get-app— Clone Frappe application repository intoapps/and install in virtualenv.bench get-config— Inspect site configuration keys.bench get-untranslated— Extract untranslated strings into language CSV file.bench init— Initialize new Bench environment directory with Python virtualenv.bench install-app— Install Frappe application onto target site database.bench migrate— Execute database schema migrations, patches, and sync DocType schemas.bench new-app— Generate boilerplate directory structure for a new Frappe app.bench new-site— Create new site with fresh MariaDB/PostgreSQL database.bench reinstall— Wipe existing site database and reinstall clean initial schema.bench restore— Restore site database and file archives from SQL dump.bench run-tests— Execute unittest suite for installed applications.bench set-config— Modifysite_config.jsonconfiguration values programmatically.bench start— Start all development background processes defined in Procfile.bench update-translations— Sync and update application translation CSV files.bench use— Set default active site for subsequent bench commands.bench worker— Start background RQ worker process daemon.boot_session— Extendbootinfodictionary sent to Desk client upon user login.
C
cint()— Safe integer type conversion returning default on failure.cstr()— Safe string type conversion handlingNonesafely.date_diff()— Calculate integer day difference between two dates (d1 - d2).db_insert()— Controller override method for Virtual DocType database insertion.db_update()— Controller override method for Virtual DocType update.delete()— Controller override method for Virtual DocType record deletion.doc.add_comment()— Appends activity timeline comment to document.doc.add_tag()— Attaches tag string to document.doc.append()— Appends new row to child table field.doc.as_dict()— Serializes document and child tables to plain Python dictionary.doc.cancel()— Cancels submitted document (docstatus: 2).doc.db_set()— Updates field directly in database bypassing validation hooks.doc.flags.ignore_if_duplicate— Prevents throwing duplicate name exception during insert.doc.flags.ignore_links— Skips validation of linked document existence.doc.flags.ignore_mandatory— Suppresses errors for missing mandatory fields.doc.flags.ignore_permissions— Bypasses user permission checks during insert/save/submit.doc.flags.ignore_validate— Bypasses execution of controllervalidate()hooks.doc.get_db_value()— Reads field value directly from database disk bypassing cache.doc.get_doc_before_save()— Returns immutable snapshot of document prior to save.doc.get_formatted()— Returns human-formatted string of field value.doc.get_tags()— Returns comma-separated string of assigned tags.doc.has_value_changed()— Checks if field value changed compared to DB value.doc.insert()— Inserts new document record into MariaDB/PostgreSQL.doc.is_dirty()— ReturnsTrueif document fields have unsaved memory edits.doc.is_new()— ReturnsTrueif document is not yet saved to database.doc.queue_action()— Queues document action for background worker execution.doc.remove_tag()— Removes tag string from document.doc.run_method()— Programmatically executes method on document instance.doc.save()— Saves changes on existing document to database.doc.submit()— Submits draft document (docstatus: 1).doc_events— Registers document lifecycle event hooks inhooks.py.doctype_calendar_js— Injects custom JS bundle into DocType Calendar view.doctype_js— Injects custom JS bundle into DocType Form view.doctype_list_js— Injects custom JS bundle into DocType List view.doctype_tree_js— Injects custom JS bundle into DocType Tree view.
F
flt()— Safe float type conversion with optional precision rounding.fmt_money()— Formats numeric value into monetary currency string.format_currency— Jinja template filter for currency formatting.format_date()— Formats ISO date string to user system format.format_datetime()— Formats ISO datetime string.format_time()— Formats time string.frappe._()— Multilingual translation function wrapper.frappe.cache()— Access site Redis Cache connection wrapper instance.frappe.call()— Executes client-side AJAX RPC call to server method.frappe.confirm()— Displays client confirmation modal dialog.frappe.datetime.add_days()— Client JS helper adding days to date.frappe.datetime.add_months()— Client JS helper adding months to date.frappe.datetime.get_diff()— Client JS helper calculating day difference between dates.frappe.datetime.get_today()— Client JS helper returning today's date string.frappe.datetime.now_datetime()— Client JS helper returning current datetime string.frappe.db.commit()— Explicitly commits current database transaction.frappe.db.count()— Counts matching database records without instantiating objects.frappe.db.delete()— Performs direct SQL row deletion based on filter conditions.frappe.db.exists()— Checks record existence in database (returns primary key name orNone).frappe.db.get_all()— Fetches record list bypassing user permissions.frappe.db.get_list()— Fetches record list enforcing user permissions.frappe.db.get_single_value()— Retrieves field value from Single DocType.frappe.db.get_value()— Queries single or multiple field values efficiently.frappe.db.has_column()— Verifies table column existence in database.frappe.db.insert()— Client-side Promise document insertion API.frappe.db.rollback()— Reverts pending database transaction.frappe.db.set_value()— Direct SQL field update bypassing validation hooks.frappe.db.sql()— Executes raw SQL queries with mandatory parameter binding.frappe.db.table_exists()— Verifies database table existence.frappe.db.touch()— Updates documentmodifiedtimestamp without field edits.frappe.defaults.get_user_default()— Retrieves client user default setting.frappe.defaults.get_user_permissions()— Retrieves user permission restrictions array.frappe.enqueue()— Enqueues background RQ worker job with queue/timeout options.frappe.format()— Universal field formatter helper based on field metadata.frappe.get_all()— Fetches records list bypassing user permissions.frappe.get_cached_doc()— Retrieves document from Redis cache.frappe.get_cached_value()— Retrieves field value from Redis cache if present.frappe.get_doc()— Instantiates Document ORM object from database or dictionary.frappe.get_list()— Fetches records list enforcing active user permissions.frappe.get_meta()— Returns Meta structure object for specified DocType.frappe.get_roles()— Fetches list of roles assigned to active user.frappe.has_permission()— Evaluates document permission for user programmatically.frappe.has_role()— Checks if user possesses specific role.frappe.local— Thread-local HTTP request context object (local.site,local.user,local.form_dict).frappe.log_error()— Logs exception traceback to system Error Log.frappe.model.add_child()— Appends new row to child table in client memory.frappe.model.delete_doc()— Programmatically deletes document and linked child records.frappe.model.make_new_doc_and_get_name()— Instantiates unsaved new document in client memory and returns name.frappe.model.mapper.get_mapped_doc()— Maps values from source document to target document.frappe.model.naming.make_autoname()— Generates auto-incremented primary keys based on format string.frappe.model.rename_doc()— Renames document primary key and updates all foreign key references.frappe.msgprint()— Displays message dialog popup to user.frappe.new_doc()— Initializes new Document instance with schema defaults.frappe.permissions.get_user_permissions()— Fetches User Permission restrictions.frappe.prompt()— Displays interactive input prompt modal.frappe.publish_progress()— Displays header progress bar in Desk interface.frappe.publish_realtime()— Publishes WebSocket event to connected browser clients.frappe.qb— PyPika SQL Query Builder interface.frappe.realtime.on()— Client JS event listener for WebSocket broadcasts.frappe.sendmail()— Queues email delivery in background.frappe.session.user— Returns active authenticated user email string.frappe.set_route()— Navigates Desk view to specified route array.frappe.share.add()— Shares specific document instance with user.frappe.share.get_users()— Gets list of users a document is shared with.frappe.share.remove()— Removes sharing permission from user.frappe.show_alert()— Displays non-blocking temporary toast notification.frappe.throw()— Raises ValidationError and displays error alert message.frappe.ui.Dialog— Instantiates custom client modal dialog.frappe.ui.form.on()— Binds JS event handlers to form lifecycle triggers.frappe.user.has_role()— Checks role assignment on client browser.frappe.user_roles— Array of roles assigned to active client user.frappe.utils.now()— Returns current datetime string.frappe.utils.today()— Returns current date string (YYYY-MM-DD).frm.add_child()— Appends new row to child table field on form.frm.add_custom_button()— Adds custom button or dropdown group button to toolbar.frm.change_custom_button_type()— Styles custom button (primary,danger,warning).frm.clear_custom_buttons()— Removes all custom buttons from form toolbar.frm.clear_table()— Wipes all child table rows from form field.frm.copy_doc()— Duplicates active document into new unsaved draft form.frm.dirty()— Returnstrueif form contains unsaved memory edits.frm.disable_form()— Makes all form fields read-only and hides save button.frm.disable_save()— Disables and hides standard Save button.frm.enable_save()— Re-enables standard Save button.frm.is_new()— Returnstrueif document has not yet been saved to DB.frm.page.add_inner_button()— Adds button into inner toolbar group.frm.page.clear_inner_actions()— Clears secondary inner action buttons.frm.page.clear_user_actions()— Clears custom user action buttons.frm.page.hide_actions_menu()— Hides standard Actions dropdown menu.frm.page.hide_menu()— Hides standard Menu dropdown button.frm.page.remove_menu_item()— Removes specific option from Menu dropdown.frm.page.set_indicator()— Sets header indicator badge color.frm.page.set_title()— Sets form header title dynamically.frm.refresh_field()— Forces DOM re-render of docfield element.frm.reload_doc()— Reloads document data from server and re-renders form.frm.save()— Saves current form ('Save','Submit','Cancel').frm.scroll_to_field()— Smooth-scrolls form container to target field.frm.set_df_property()— Dynamically sets docfield property (reqd,read_only,hidden).frm.set_intro()— Displays colored header banner on top of form view.frm.set_query()— Sets custom REST filter on Link field.frm.set_value()— Sets docfield value on client form.frm.toggle_display()— Shorthand to toggle field visibility.frm.toggle_enable()— Shorthand to toggle field read-only state.frm.toggle_reqd()— Shorthand to toggle mandatory field requirement.
G
get_datetime()— Parses datetime string into Pythondatetime.datetimeobject.getdate()— Parses string into Pythondatetime.dateobject.global_date_format— Jinja template filter formatting ISO date to global format.
H
has_permission— Registers custom document permission hook inhooks.py.hdel()— Deletes key from Redis hash map.hget()— Retrieves key value from Redis hash map.hset()— Stores key value in Redis hash map.
L
load_from_db()— Controller override method for Virtual DocType record retrieval.
M
money_in_words— Jinja filter & server utility converting numeric amount to words.
O
on_cancel()— Controller hook executed right after cancellation.on_change()— Controller hook executed whenever workflow status changes.on_rollback()— Hook executed if database transaction rolls back.on_submit()— Controller hook executed right after submission.on_trash()— Controller hook executed right before database row deletion.on_update()— Controller hook executed right after SQL save commit.on_update_after_submit()— Controller hook executed after editing submitted document.override_doctype_class— Overrides core controller Python class inhooks.py.override_whitelisted_methods— Overrides core whitelisted API method inhooks.py.
P
permission_query_conditions— Injects dynamic SQL permission conditions.portal_menu_items— Registers custom client portal menu links.
R
random_string()— Generates secure random string.
S
scheduler_events— Defines periodic background cron tasks inhooks.py.scrub()— Scrubs string into valid Python variable/field identifier.slug()— Slugifies text string for URL routing.
T
time_diff_in_seconds()— Calculates time difference in seconds.today()— Returns current date string (YYYY-MM-DD).
V
validate()— Primary controller validation hook.validate_email_address()— Validates email string format.validate_url()— Validates URL string format.Virtual DocType— External data source backed DocType (is_virtual=1).
W
web_include_css— Includes global portal CSS bundle.web_include_js— Includes global portal JS bundle.website_redirects— Registers website URL redirect rules.website_route_rules— Rewrites web routes cleanly inhooks.py.@frappe.whitelist()— Exposes Python function as HTTP REST/RPC endpoint.