APIs / Constants available in Server Scripts / Script Reports / System Console

Name Type Value Signature Docs Parent
json.loads function None (s, *, cls=None, object_hook=None, parse_float=None, parse_int=None, parse_constant=None, object_pairs_hook=None, **kw) Deserialize ``s`` (a ``str``, ``bytes`` or ``bytearray`` instance containing a JSON document) to a Python object. ``object_hook`` is an optional function that will be called with the result of any object literal decode (a ``dict``). The return value of ``object_hook`` will be used instead of the ``dict``. This feature can be used to implement custom decoders (e.g. JSON-RPC class hinting). ``object_pairs_hook`` is an optional function that will be called with the result of any object literal decoded with an ordered list of pairs. The return value of ``object_pairs_hook`` will be used instead of the ``dict``. This feature can be used to implement custom decoders. If ``object_hook`` is also defined, the ``object_pairs_hook`` takes priority. ``parse_float``, if specified, will be called with the string of every JSON float to be decoded. By default this is equivalent to float(num_str). This can be used to use another datatype or parser for JSON floats (e.g. decimal.Decimal). ``parse_int``, if specified, will be called with the string of every JSON int to be decoded. By default this is equivalent to int(num_str). This can be used to use another datatype or parser for JSON integers (e.g. float). ``parse_constant``, if specified, will be called with one of the following strings: -Infinity, Infinity, NaN. This can be used to raise an exception if invalid JSON numbers are encountered. To use a custom ``JSONDecoder`` subclass, specify it with the ``cls`` kwarg; otherwise ``JSONDecoder`` is used. json
json.dumps function None (obj, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, sort_keys=False, **kw) Serialize ``obj`` to a JSON formatted ``str``. If ``skipkeys`` is true then ``dict`` keys that are not basic types (``str``, ``int``, ``float``, ``bool``, ``None``) will be skipped instead of raising a ``TypeError``. If ``ensure_ascii`` is false, then the return value can contain non-ASCII characters if they appear in strings contained in ``obj``. Otherwise, all such characters are escaped in JSON strings. If ``check_circular`` is false, then the circular reference check for container types will be skipped and a circular reference will result in an ``RecursionError`` (or worse). If ``allow_nan`` is false, then it will be a ``ValueError`` to serialize out of range ``float`` values (``nan``, ``inf``, ``-inf``) in strict compliance of the JSON specification, instead of using the JavaScript equivalents (``NaN``, ``Infinity``, ``-Infinity``). If ``indent`` is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines. ``None`` is the most compact representation. If specified, ``separators`` should be an ``(item_separator, key_separator)`` tuple. The default is ``(', ', ': ')`` if *indent* is ``None`` and ``(',', ': ')`` otherwise. To get the most compact JSON representation, you should specify ``(',', ':')`` to eliminate whitespace. ``default(obj)`` is a function that should return a serializable version of obj or raise TypeError. The default simply raises TypeError. If *sort_keys* is true (default: ``False``), then the output of dictionaries will be sorted by key. To use a custom ``JSONEncoder`` subclass (e.g. one that overrides the ``.default()`` method to serialize additional types), specify it with the ``cls`` kwarg; otherwise ``JSONEncoder`` is used. json
as_json function None (obj: dict | list, indent=1, separators=None, ensure_ascii=True) -> str None
dict function None None dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) None
log function None (msg: str) -> None Add to `debug_log` :param msg: Message.
_dict function None None dict like object that exposes keys as attributes None
frappe.call function None (function, **kwargs) Executes a whitelisted function or Server Script of type API frappe
frappe.format function None (*args, **kwargs) Format value with given field properties. :param value: Value to be formatted. :param df: (Optional) DocField object with properties `fieldtype`, `options` etc. frappe
frappe.format_value function None (*args, **kwargs) Format value with given field properties. :param value: Value to be formatted. :param df: (Optional) DocField object with properties `fieldtype`, `options` etc. frappe
frappe.date_format str dd-mm-yyyy None None None
frappe.time_format str HH:mm:ss None None None
frappe.format_date function None (date, format='long') returns localized date in the form of January 1, 2012 frappe
frappe.bold function None (text) None frappe
frappe.copy_doc function None (doc: 'Document', ignore_no_copy: bool = True) -> 'Document' No_copy fields also get copied. frappe
frappe.errprint function None (msg: str) -> None Log error. This is sent back as `exc` in response. :param msg: Message. frappe
frappe.qb function None None None None
frappe.get_meta function None (doctype, cached=True) Get `frappe.model.meta.Meta` instance of given doctype name. frappe
frappe.new_doc function None (doctype: str, *, parent_doc: Optional[ForwardRef('Document')] = None, parentfield: str | None = None, as_dict: bool = False, **kwargs) -> 'Document' Returns a new document of the given DocType with defaults set. :param doctype: DocType of the new document. :param parent_doc: [optional] add to parent document. :param parentfield: [optional] add against this `parentfield`. :param as_dict: [optional] return as dictionary instead of Document. :param kwargs: [optional] You can specify fields as field=value pairs in function call. frappe
frappe.get_doc function None (*args, **kwargs) Return a `frappe.model.document.Document` object of the given type and name. :param arg1: DocType name as string **or** document JSON. :param arg2: [optional] Document name as string. Examples: # insert a new document todo = frappe.get_doc({"doctype":"ToDo", "description": "test"}) todo.insert() # open an existing document todo = frappe.get_doc("ToDo", "TD0001") frappe
frappe.get_mapped_doc function None (from_doctype, from_docname, table_maps, target_doc=None, postprocess=None, ignore_permissions=False, ignore_child_tables=False, cached=False) None frappe
frappe.get_last_doc function None (doctype, filters=None, order_by='creation desc', *, for_update=False) Get last created document of this type. frappe
frappe.get_cached_doc function None (*args, **kwargs) -> 'Document' None frappe
frappe.get_list function None (doctype, *args, **kwargs) List database query via `frappe.model.db_query`. Will also check for permissions. :param doctype: DocType on which query is to be made. :param fields: List of fields or `*`. :param filters: List of filters (see example). :param order_by: Order By e.g. `modified desc`. :param limit_start: Start results at record #. Default 0. :param limit_page_length: No of records in the page. Default 20. Example usage: # simple dict filter frappe.get_list("ToDo", fields=["name", "description"], filters = {"owner":"test@example.com"}) # filter as a list of lists frappe.get_list("ToDo", fields="*", filters = [["modified", ">", "2014-01-01"]]) frappe
frappe.get_all function None (doctype, *args, **kwargs) List database query via `frappe.model.db_query`. Will **not** check for permissions. Parameters are same as `frappe.get_list` :param doctype: DocType on which query is to be made. :param fields: List of fields or `*`. Default is: `["name"]`. :param filters: List of filters (see example). :param order_by: Order By e.g. `modified desc`. :param limit_start: Start results at record #. Default 0. :param limit_page_length: No of records in the page. Default 20. Example usage: # simple dict filter frappe.get_all("ToDo", fields=["name", "description"], filters = {"owner":"test@example.com"}) # filter as a list of lists frappe.get_all("ToDo", fields=["*"], filters = [["modified", ">", "2014-01-01"]]) frappe
frappe.get_system_settings function None (key) None frappe
frappe.rename_doc function None (doctype: str | None = None, old: str | None = None, new: str = None, force: bool = False, merge: bool = False, ignore_permissions: bool = False, ignore_if_exists: bool = False, show_alert: bool = True, rebuild_search: bool = True, doc: frappe.model.document.Document | None = None, validate: bool = True) -> str Rename a doc(dt, old) to doc(dt, new) and update all linked fields of type "Link". doc: Document object to be renamed. new: New name for the record. If None, and doctype is specified, new name may be automatically generated via before_rename hooks. doctype: DocType of the document. Not required if doc is passed. old: Current name of the document. Not required if doc is passed. force: Allow even if document is not allowed to be renamed. merge: Merge with existing document of new name. ignore_permissions: Ignore user permissions while renaming. ignore_if_exists: Don't raise exception if document with new name already exists. This will quietely overwrite the existing document. show_alert: Display alert if document is renamed successfully. rebuild_search: Rebuild linked doctype search after renaming. validate: Validate before renaming. If False, it is assumed that the caller has already validated. frappe
frappe.delete_doc function None (doctype=None, name=None, force=0, ignore_doctypes=None, for_reload=False, ignore_permissions=False, flags=None, ignore_on_trash=False, ignore_missing=True, delete_permanently=False) Deletes a doc(dt, dn) and validates if it is not submitted and not linked in a live record frappe
frappe.utils.DATE_FORMAT str %Y-%m-%d None None None
frappe.utils.TIME_FORMAT str %H:%M:%S.%f None None None
frappe.utils.DATETIME_FORMAT str %Y-%m-%d %H:%M:%S.%f None None None
frappe.utils.is_invalid_date_string function None (date_string: str) -> bool None frappe.utils
frappe.utils.getdate function None (string_date: Optional[ForwardRef('DateTimeLikeObject')] = None, parse_day_first: bool = False) -> datetime.date | None Converts string date (yyyy-mm-dd) to datetime.date object. If no input is provided, current date is returned. frappe.utils
frappe.utils.get_datetime function None (datetime_str: Optional[ForwardRef('DateTimeLikeObject')] = None) -> datetime.datetime | None None frappe.utils
frappe.utils.get_timedelta function None (time: str | None = None) -> datetime.timedelta | None Return `datetime.timedelta` object from string value of a valid time format. Returns None if `time` is not a valid format Args: time (str): A valid time representation. This string is parsed using `dateutil.parser.parse`. Examples of valid inputs are: '0:0:0', '17:21:00', '2012-01-19 17:21:00'. Checkout https://dateutil.readthedocs.io/en/stable/parser.html#dateutil.parser.parse Returns: datetime.timedelta: Timedelta object equivalent of the passed `time` string frappe.utils
frappe.utils.to_timedelta function None (time_str: str | datetime.time) -> datetime.timedelta None frappe.utils
frappe.utils.add_to_date function None (date: Union[str, datetime.date, datetime.datetime], years=0, months=0, weeks=0, days=0, hours=0, minutes=0, seconds=0, as_string=False, as_datetime=False) -> Union[str, datetime.date, datetime.datetime] Adds `days` to the given date frappe.utils
frappe.utils.add_days function None (date, days) None frappe.utils
frappe.utils.add_months function None (date, months) None frappe.utils
frappe.utils.add_years function None (date, years) None frappe.utils
frappe.utils.date_diff function None (string_ed_date, string_st_date) None frappe.utils
frappe.utils.month_diff function None (string_ed_date, string_st_date) None frappe.utils
frappe.utils.time_diff function None (string_ed_date, string_st_date) None frappe.utils
frappe.utils.time_diff_in_seconds function None (string_ed_date, string_st_date) None frappe.utils
frappe.utils.time_diff_in_hours function None (string_ed_date, string_st_date) None frappe.utils
frappe.utils.now_datetime function None () None frappe.utils
frappe.utils.get_timestamp function None (date) None frappe.utils
frappe.utils.get_eta function None (from_time, percent_complete) None frappe.utils
frappe.utils.get_system_timezone function None () None frappe.utils
frappe.utils.get_datetime_in_timezone function None (time_zone) None frappe.utils
frappe.utils.convert_utc_to_system_timezone function None (utc_timestamp) None frappe.utils
frappe.utils.now function None () -> str return current datetime as yyyy-mm-dd hh:mm:ss frappe.utils
frappe.utils.nowdate function None () -> str return current date as yyyy-mm-dd frappe.utils
frappe.utils.today function None () -> str None frappe.utils
frappe.utils.get_abbr function None (string: str, max_len: int = 2) -> str None frappe.utils
frappe.utils.nowtime function None () -> str return current time in hh:mm frappe.utils
frappe.utils.get_first_day function None (dt, d_years: int = 0, d_months: int = 0, as_str: bool = False) -> str | datetime.date Returns the first day of the month for the date specified by date object Also adds `d_years` and `d_months` if specified frappe.utils
frappe.utils.get_quarter_start function None (dt, as_str: bool = False) -> str | datetime.date None frappe.utils
frappe.utils.get_first_day_of_week function None (dt, as_str=False) None frappe.utils
frappe.utils.get_year_start function None (dt, as_str=False) None frappe.utils
frappe.utils.get_last_day_of_week function None (dt) None frappe.utils
frappe.utils.get_last_day function None (dt) Returns last day of the month using: `get_first_day(dt, 0, 1) + datetime.timedelta(-1)` frappe.utils
frappe.utils.get_quarter_ending function None (date) None frappe.utils
frappe.utils.get_time function None (time_str: str) -> datetime.time None frappe.utils
frappe.utils.get_datetime_str function None (datetime_obj) -> str None frappe.utils
frappe.utils.get_date_str function None (date_obj) -> str None frappe.utils
frappe.utils.get_time_str function None (timedelta_obj) -> str None frappe.utils
frappe.utils.get_user_date_format function None () -> str Get the current user date format. The result will be cached. frappe.utils
frappe.utils.get_user_time_format function None () -> str Get the current user time format. The result will be cached. frappe.utils
frappe.utils.format_date function None (string_date=None, format_string: str | None = None, parse_day_first: bool = False) -> str Converts the given string date to :data:`user_date_format` User format specified in defaults Examples: * dd-mm-yyyy * mm-dd-yyyy * dd/mm/yyyy frappe.utils
frappe.utils.formatdate function None (string_date=None, format_string: str | None = None, parse_day_first: bool = False) -> str Converts the given string date to :data:`user_date_format` User format specified in defaults Examples: * dd-mm-yyyy * mm-dd-yyyy * dd/mm/yyyy frappe.utils
frappe.utils.format_time function None (time_string=None, format_string: str | None = None) -> str Converts the given string time to :data:`user_time_format` User format specified in defaults Examples: * HH:mm:ss * HH:mm frappe.utils
frappe.utils.format_datetime function None (datetime_string: Union[str, datetime.date, datetime.datetime], format_string: str | None = None) -> str Converts the given string time to :data:`user_datetime_format` User format specified in defaults Examples: * dd-mm-yyyy HH:mm:ss * mm-dd-yyyy HH:mm frappe.utils
frappe.utils.format_duration function None (seconds, hide_days=False) Converts the given duration value in float(seconds) to duration format example: converts 12885 to '3h 34m 45s' where 12885 = seconds in float frappe.utils
frappe.utils.get_weekdays function None () None frappe.utils
frappe.utils.get_weekday function None (datetime: datetime.datetime | None = None) -> str None frappe.utils
frappe.utils.get_timespan_date_range function None (timespan: str) -> tuple[datetime.datetime, datetime.datetime] | None None frappe.utils
frappe.utils.global_date_format function None (date, format='long') returns localized date in the form of January 1, 2012 frappe.utils
frappe.utils.has_common function None (l1: Hashable, l2: Hashable) -> bool Returns truthy value if there are common elements in lists l1 and l2 frappe.utils
frappe.utils.flt function None (s: Union[int, float, str], precision: int | None = None, rounding_method: str | None = None) -> float Convert to float (ignoring commas in string) :param s: Number in string or other numeric format. :param precision: optional argument to specify precision for rounding. :returns: Converted number in python float type. Returns 0 if input can not be converted to float. Examples: >>> flt("43.5", precision=0) 44 >>> flt("42.5", precision=0) 42 >>> flt("10,500.5666", precision=2) 10500.57 >>> flt("a") 0.0 frappe.utils
frappe.utils.cint function None (s: Union[int, float, str], default: int = 0) -> int Convert to integer :param s: Number in string or other numeric format. :returns: Converted number in python integer type. Returns default if input can not be converted to integer. Examples: >>> cint("100") 100 >>> cint("a") 0 frappe.utils
frappe.utils.floor function None (s) A number representing the largest integer less than or equal to the specified number Parameters ---------- s : int or str or Decimal object The mathematical value to be floored Returns ------- int number representing the largest integer less than or equal to the specified number frappe.utils
frappe.utils.ceil function None (s) The smallest integer greater than or equal to the given number Parameters ---------- s : int or str or Decimal object The mathematical value to be ceiled Returns ------- int smallest integer greater than or equal to the given number frappe.utils
frappe.utils.cstr function None (s, encoding='utf-8') None frappe.utils
frappe.utils.rounded function None (num, precision=0, rounding_method=None) Round according to method set in system setting, defaults to banker's rounding frappe.utils
frappe.utils.remainder function None (numerator: Union[int, float], denominator: Union[int, float], precision: int = 2) -> Union[int, float] None frappe.utils
frappe.utils.safe_div function None (numerator: Union[int, float], denominator: Union[int, float], precision: int = 2) -> float SafeMath division that returns zero when divided by zero. frappe.utils
frappe.utils.round_based_on_smallest_currency_fraction function None (value, currency, precision=2) None frappe.utils
frappe.utils.encode function None (obj, encoding='utf-8') None frappe.utils
frappe.utils.parse_val function None (v) Converts to simple datatypes from SQL query results frappe.utils
frappe.utils.fmt_money function None (amount: str | float | int | None, precision: int | None = None, currency: str | None = None, format: str | None = None) -> str Convert to string with commas for thousands, millions etc frappe.utils
frappe.utils.get_number_format_info function None (format: str) -> tuple[str, str, int] None frappe.utils
frappe.utils.money_in_words function None (number: str | float | int, main_currency: str | None = None, fraction_currency: str | None = None) Returns string in words with currency and fraction currency. frappe.utils
frappe.utils.in_words function None (integer: int, in_million=True) -> str Returns string in words for the given integer. frappe.utils
frappe.utils.is_html function None (text: str) -> bool None frappe.utils
frappe.utils.is_image function None (filepath: str) -> bool None frappe.utils
frappe.utils.get_thumbnail_base64_for_image function None (src) None frappe.utils
frappe.utils.image_to_base64 function None (image, extn: str) -> bytes None frappe.utils
frappe.utils.pdf_to_base64 function None (filename: str) -> bytes | None None frappe.utils
frappe.utils.strip_html function None (text: str) -> str removes anything enclosed in and including <> frappe.utils
frappe.utils.escape_html function None (text: str) -> str None frappe.utils
frappe.utils.pretty_date function None (iso_datetime: datetime.datetime | str) -> str Return a localized string representation of the delta to the current system time. For example, "1 hour ago", "2 days ago", "in 5 seconds", etc. frappe.utils
frappe.utils.comma_or function None (some_list, add_quotes=True) None frappe.utils
frappe.utils.comma_and function None (some_list, add_quotes=True) None frappe.utils
frappe.utils.comma_sep function None (some_list, pattern, add_quotes=True) None frappe.utils
frappe.utils.new_line_sep function None (some_list) None frappe.utils
frappe.utils.filter_strip_join function None (some_list: list[str], sep: str) -> list[str] given a list, filter None values, strip spaces and join frappe.utils
frappe.utils.get_url function None (uri: str | None = None, full_address: bool = False) -> str get app url from request frappe.utils
frappe.utils.get_host_name_from_request function None () -> str None frappe.utils
frappe.utils.url_contains_port function None (url: str) -> bool None frappe.utils
frappe.utils.get_host_name function None () -> str None frappe.utils
frappe.utils.get_link_to_form function None (doctype: str, name: str, label: str | None = None) -> str None frappe.utils
frappe.utils.get_link_to_report function None (name: str, label: str | None = None, report_type: str | None = None, doctype: str | None = None, filters: dict | None = None) -> str None frappe.utils
frappe.utils.get_absolute_url function None (doctype: str, name: str) -> str None frappe.utils
frappe.utils.get_url_to_form function None (doctype: str, name: str) -> str None frappe.utils
frappe.utils.get_url_to_list function None (doctype: str) -> str None frappe.utils
frappe.utils.get_url_to_report function None (name, report_type: str | None = None, doctype: str | None = None) -> str None frappe.utils
frappe.utils.get_url_to_report_with_filters function None (name, filters, report_type=None, doctype=None) None frappe.utils
frappe.utils.evaluate_filters function None (doc, filters: dict | list | tuple) Returns true if doc matches filters frappe.utils
frappe.utils.compare function None (val1: Any, condition: str, val2: Any, fieldtype: str | None = None) None frappe.utils
frappe.utils.get_filter function None (doctype: str, f: dict | list | tuple, filters_config=None) -> 'frappe._dict' Returns a _dict like { "doctype": "fieldname": "operator": "value": "fieldtype": } frappe.utils
frappe.utils.make_filter_tuple function None (doctype, key, value) return a filter tuple like [doctype, key, operator, value] frappe.utils
frappe.utils.make_filter_dict function None (filters) convert this [[doctype, key, operator, value], ..] to this { key: (operator, value), .. } frappe.utils
frappe.utils.sanitize_column function None (column_name: str) -> None None frappe.utils
frappe.utils.scrub_urls function None (html: str) -> str None frappe.utils
frappe.utils.expand_relative_urls function None (html: str) -> str None frappe.utils
frappe.utils.quoted function None (url: str) -> str None frappe.utils
frappe.utils.quote_urls function None (html: str) -> str None frappe.utils
frappe.utils.unique function None (seq: Sequence[ForwardRef('T')]) -> list['T'] use this instead of list(set()) to preserve order of the original list. Thanks to Stackoverflow: http://stackoverflow.com/questions/480214/how-do-you-remove-duplicates-from-a-list-in-python-whilst-preserving-order frappe.utils
frappe.utils.strip function None (val: str, chars: str | None = None) -> str None frappe.utils
frappe.utils.to_markdown function None (html: str) -> str None frappe.utils
frappe.utils.md_to_html function None (markdown_text: str) -> Optional[ForwardRef('UnicodeWithAttrs')] None frappe.utils
frappe.utils.markdown function None (markdown_text) None frappe.utils
frappe.utils.is_subset function None (list_a: list, list_b: list) -> bool Returns whether list_a is a subset of list_b frappe.utils
frappe.utils.generate_hash function None (*args, **kwargs) -> str None frappe.utils
frappe.utils.get_user_info_for_avatar function None (user_id: str) -> frappe.utils.data._UserInfo None frappe.utils
frappe.get_url function None (uri: str | None = None, full_address: bool = False) -> str get app url from request frappe
frappe.render_template function None (template, context=None, is_path=None, safe_render=True) Render a template using Jinja :param template: path or HTML containing the jinja template :param context: dict of properties to pass to the template :param is_path: (optional) assert that the `template` parameter is a path :param safe_render: (optional) prevent server side scripting via jinja templating frappe
frappe.msgprint function None (msg: str, title: str | None = None, raise_exception: bool | type[Exception] = False, as_table: bool = False, as_list: bool = False, indicator: Optional[Literal['blue', 'green', 'orange', 'red', 'yellow']] = None, alert: bool = False, primary_action: str = None, is_minimizable: bool = False, wide: bool = False, *, realtime=False) -> None Print a message to the user (via HTTP response). Messages are sent in the `__server_messages` property in the response JSON and shown in a pop-up / modal. :param msg: Message. :param title: [optional] Message title. Default: "Message". :param raise_exception: [optional] Raise given exception and show message. :param as_table: [optional] If `msg` is a list of lists, render as HTML table. :param as_list: [optional] If `msg` is a list, render as un-ordered list. :param primary_action: [optional] Bind a primary server/client side action. :param is_minimizable: [optional] Allow users to minimize the modal :param wide: [optional] Show wide modal :param realtime: Publish message immediately using websocket. frappe
frappe.throw function None (msg: str, exc: type[Exception] = , title: str | None = None, is_minimizable: bool = False, wide: bool = False, as_list: bool = False) -> None Throw execption and show message (`msgprint`). :param msg: Message. :param exc: Exception class. Default `frappe.ValidationError` frappe
frappe.sendmail function None (recipients=None, sender='', subject='No Subject', message='No Message', as_markdown=False, delayed=True, reference_doctype=None, reference_name=None, unsubscribe_method=None, unsubscribe_params=None, unsubscribe_message=None, add_unsubscribe_link=1, attachments=None, content=None, doctype=None, name=None, reply_to=None, queue_separately=False, cc=None, bcc=None, message_id=None, in_reply_to=None, send_after=None, expose_recipients=None, send_priority=1, communication=None, retry=1, now=None, read_receipt=None, is_notification=False, inline_images=None, template=None, args=None, header=None, print_letterhead=False, with_container=False, email_read_tracker_url=None) -> Optional[ForwardRef('EmailQueue')] Send email using user's default **Email Account** or global default **Email Account**. :param recipients: List of recipients. :param sender: Email sender. Default is current user or default outgoing account. :param subject: Email Subject. :param message: (or `content`) Email Content. :param as_markdown: Convert content markdown to HTML. :param delayed: Send via scheduled email sender **Email Queue**. Don't send immediately. Default is true :param send_priority: Priority for Email Queue, default 1. :param reference_doctype: (or `doctype`) Append as communication to this DocType. :param reference_name: (or `name`) Append as communication to this document name. :param unsubscribe_method: Unsubscribe url with options email, doctype, name. e.g. `/api/method/unsubscribe` :param unsubscribe_params: Unsubscribe paramaters to be loaded on the unsubscribe_method [optional] (dict). :param attachments: List of attachments. :param reply_to: Reply-To Email Address. :param message_id: Used for threading. If a reply is received to this email, Message-Id is sent back as In-Reply-To in received email. :param in_reply_to: Used to send the Message-Id of a received email back as In-Reply-To. :param send_after: Send after the given datetime. :param expose_recipients: Display all recipients in the footer message - "This email was sent to" :param communication: Communication link to be set in Email Queue record :param inline_images: List of inline images as {"filename", "filecontent"}. All src properties will be replaced with random Content-Id :param template: Name of html template from templates/emails folder :param args: Arguments for rendering the template :param header: Append header in email :param with_container: Wraps email inside a styled container frappe
frappe.get_print function None (doctype=None, name=None, print_format=None, style=None, as_pdf=False, doc=None, output=None, no_letterhead=0, password=None, pdf_options=None, letterhead=None) Get Print Format for given document. :param doctype: DocType of document. :param name: Name of document. :param print_format: Print Format name. Default 'Standard', :param style: Print Format style. :param as_pdf: Return as PDF. Default False. :param password: Password to encrypt the pdf with. Default None frappe
frappe.attach_print function None (doctype, name, file_name=None, print_format=None, style=None, html=None, doc=None, lang=None, print_letterhead=True, password=None, letterhead=None) None frappe
frappe.user str Administrator None None None
frappe.get_fullname function None (user=None) get the full name (first name + last name) of the user from User frappe
frappe.get_gravatar function None (email: str, default: Literal['mm', '404'] = 'mm') -> str None frappe
frappe.full_name NoneType None None None None
frappe.session.user str Administrator None None None
frappe.session.csrf_token NoneType None None None None
frappe.make_get_request function None (url, **kwargs) None frappe
frappe.make_post_request function None (url, **kwargs) None frappe
frappe.make_put_request function None (url, **kwargs) None frappe
frappe.make_patch_request function None (url, **kwargs) None frappe
frappe.make_delete_request function None (url, **kwargs) None frappe
frappe.socketio_port int 9000 None None None
frappe.get_hooks function None (hook=None, default=None, app_name=None) None frappe
frappe.enqueue function None (function, **kwargs) Enqueue function to be executed using a background worker Accepts frappe.enqueue params like job_name, queue, timeout, etc. in addition to params to be passed to function :param function: whitelisted function or API Method set in Server Script frappe
frappe.sanitize_html function None (html, linkify=False) Sanitize HTML tags, attributes and style to prevent XSS attacks Based on bleach clean, bleach whitelist and html5lib's Sanitizer defaults Does not sanitize JSON, as it could lead to future problems frappe
frappe.log_error function None (title=None, message=None, reference_doctype=None, reference_name=None, *, defer_insert=False) Log error to Error Log frappe
frappe.log function None (msg: str) -> None Add to `debug_log` :param msg: Message. frappe
frappe.db.get_list function None (doctype, *args, **kwargs) List database query via `frappe.model.db_query`. Will also check for permissions. :param doctype: DocType on which query is to be made. :param fields: List of fields or `*`. :param filters: List of filters (see example). :param order_by: Order By e.g. `modified desc`. :param limit_start: Start results at record #. Default 0. :param limit_page_length: No of records in the page. Default 20. Example usage: # simple dict filter frappe.get_list("ToDo", fields=["name", "description"], filters = {"owner":"test@example.com"}) # filter as a list of lists frappe.get_list("ToDo", fields="*", filters = [["modified", ">", "2014-01-01"]]) frappe.db
frappe.db.get_all function None (doctype, *args, **kwargs) List database query via `frappe.model.db_query`. Will **not** check for permissions. Parameters are same as `frappe.get_list` :param doctype: DocType on which query is to be made. :param fields: List of fields or `*`. Default is: `["name"]`. :param filters: List of filters (see example). :param order_by: Order By e.g. `modified desc`. :param limit_start: Start results at record #. Default 0. :param limit_page_length: No of records in the page. Default 20. Example usage: # simple dict filter frappe.get_all("ToDo", fields=["name", "description"], filters = {"owner":"test@example.com"}) # filter as a list of lists frappe.get_all("ToDo", fields=["*"], filters = [["modified", ">", "2014-01-01"]]) frappe.db
frappe.db.get_value function None (doctype, filters=None, fieldname='name', ignore=None, as_dict=False, debug=False, order_by='KEEP_DEFAULT_ORDERING', cache=False, for_update=False, *, run=True, pluck=False, distinct=False) Returns a document property or list of properties. :param doctype: DocType name. :param filters: Filters like `{"x":"y"}` or name of the document. `None` if Single DocType. :param fieldname: Column name. :param ignore: Don't raise exception if table, column is missing. :param as_dict: Return values as dict. :param debug: Print query in error log. :param order_by: Column to order by Example: # return first customer starting with a frappe.db.get_value("Customer", {"name": ("like a%")}) # return last login of **User** `test@example.com` frappe.db.get_value("User", "test@example.com", "last_login") last_login, last_ip = frappe.db.get_value("User", "test@example.com", ["last_login", "last_ip"]) # returns default date_format frappe.db.get_value("System Settings", None, "date_format") frappe.db
frappe.db.set_value function None (dt, dn, field, val=None, modified=None, modified_by=None, update_modified=True, debug=False) Set a single value in the database, do not call the ORM triggers but update the modified timestamp (unless specified not to). **Warning:** this function will not call Document events and should be avoided in normal cases. :param dt: DocType name. :param dn: Document name for updating single record or filters for updating many records. :param field: Property / field name or dictionary of values to be updated :param value: Value to be updated. :param modified: Use this as the `modified` timestamp. :param modified_by: Set this user as `modified_by`. :param update_modified: default True. Set as false, if you don't want to update the timestamp. :param debug: Print the query in the developer / js console. frappe.db
frappe.db.get_single_value function None (doctype, fieldname, cache=True) Get property of Single DocType. Cache locally by default :param doctype: DocType of the single object whose value is requested :param fieldname: `fieldname` of the property whose value is requested Example: # Get the default value of the company from the Global Defaults doctype. company = frappe.db.get_single_value('Global Defaults', 'default_company') frappe.db
frappe.db.get_default function None (key, parent='__default') Returns default value as a list if multiple or single frappe.db
frappe.db.exists function None (dt, dn=None, cache=False) Return the document name of a matching document, or None. Note: `cache` only works if `dt` and `dn` are of type `str`. ## Examples Pass doctype and docname (only in this case we can cache the result) ``` exists("User", "jane@example.org", cache=True) ``` Pass a dict of filters including the `"doctype"` key: ``` exists({"doctype": "User", "full_name": "Jane Doe"}) ``` Pass the doctype and a dict of filters: ``` exists("User", {"full_name": "Jane Doe"}) ``` frappe.db
frappe.db.count function None (dt, filters=None, debug=False, cache=False, distinct: bool = True) Returns `COUNT(*)` for given DocType and filters. frappe.db
frappe.db.escape function None (s, percent=True) Excape quotes and percent in given string. frappe.db
frappe.db.sql function None (query, *args, **kwargs) a wrapper for frappe.db.sql to allow reads frappe.db
frappe.db.commit function None () Commit current transaction. Calls SQL `COMMIT`. frappe.db
frappe.db.rollback function None (*, save_point=None) `ROLLBACK` current transaction. Optionally rollback to a known save_point. frappe.db
frappe.db.after_commit function None (func: collections.abc.Callable) -> None Manage callbacks. ``` # Capture callacks callbacks = CallbackManager() # Put a function call in queue callbacks.add(func) # Run all pending functions in queue callbacks.run() # Reset queue callbacks.reset() ``` Example usage: frappe.db.after_commit frappe.db
frappe.db.before_commit function None (func: collections.abc.Callable) -> None Manage callbacks. ``` # Capture callacks callbacks = CallbackManager() # Put a function call in queue callbacks.add(func) # Run all pending functions in queue callbacks.run() # Reset queue callbacks.reset() ``` Example usage: frappe.db.after_commit frappe.db
frappe.db.after_rollback function None (func: collections.abc.Callable) -> None Manage callbacks. ``` # Capture callacks callbacks = CallbackManager() # Put a function call in queue callbacks.add(func) # Run all pending functions in queue callbacks.run() # Reset queue callbacks.reset() ``` Example usage: frappe.db.after_commit frappe.db
frappe.db.before_rollback function None (func: collections.abc.Callable) -> None Manage callbacks. ``` # Capture callacks callbacks = CallbackManager() # Put a function call in queue callbacks.add(func) # Run all pending functions in queue callbacks.run() # Reset queue callbacks.reset() ``` Example usage: frappe.db.after_commit frappe.db
frappe.db.add_index function None (doctype: str, fields: list, index_name: str = None) Creates an index with given fields if not already created. Index name will be `fieldname1_fieldname2_index` frappe.db
frappe.lang str en None None None
frappe.NotFound function None (description: 'str | None' = None, response: 'Response | None' = None) -> 'None' *404* `Not Found` Raise if a resource does not exist and never existed. frappe
frappe.SiteNotSpecifiedError function None (*args, **kwargs) None frappe
frappe.UrlSchemeNotSupported function None None None None
frappe.ValidationError function None None None None
frappe.FrappeTypeError function None None None None
frappe.AuthenticationError function None None None None
frappe.SessionExpired function None None None None
frappe.PermissionError function None None None None
frappe.DoesNotExistError function None None None None
frappe.PageDoesNotExistError function None None None None
frappe.NameError function None None None None
frappe.OutgoingEmailError function None None None None
frappe.SessionStopped function None None None None
frappe.UnsupportedMediaType function None None None None
frappe.RequestToken function None None None None
frappe.Redirect function None None None None
frappe.CSRFTokenError function None None None None
frappe.TooManyRequestsError function None None None None
frappe.ImproperDBConfigurationError function None (reason, msg=None) Used when frappe detects that database or tables are not properly configured frappe
frappe.DuplicateEntryError function None None None None
frappe.DataError function None None None None
frappe.UnknownDomainError function None None None None
frappe.MappingMismatchError function None None None None
frappe.InvalidStatusError function None None None None
frappe.MandatoryError function None None None None
frappe.NonNegativeError function None None None None
frappe.InvalidSignatureError function None None None None
frappe.RateLimitExceededError function None None None None
frappe.CannotChangeConstantError function None None None None
frappe.CharacterLengthExceededError function None None None None
frappe.UpdateAfterSubmitError function None None None None
frappe.LinkValidationError function None None None None
frappe.CancelledLinkError function None None None None
frappe.DocstatusTransitionError function None None None None
frappe.TimestampMismatchError function None None None None
frappe.EmptyTableError function None None None None
frappe.LinkExistsError function None None None None
frappe.InvalidEmailAddressError function None None None None
frappe.InvalidNameError function None None None None
frappe.InvalidPhoneNumberError function None None None None
frappe.TemplateNotFoundError function None None None None
frappe.UniqueValidationError function None None None None
frappe.AppNotInstalledError function None None None None
frappe.IncorrectSitePath function None (description: 'str | None' = None, response: 'Response | None' = None) -> 'None' None frappe
frappe.ImplicitCommitError function None None None None
frappe.RetryBackgroundJobError function None None None None
frappe.DocumentLockedError function None None None None
frappe.CircularLinkingError function None None None None
frappe.SecurityException function None None None None
frappe.InvalidColumnName function None None None None
frappe.IncompatibleApp function None None None None
frappe.InvalidDates function None None None None
frappe.DataTooLongException function None None None None
frappe.FileAlreadyAttachedException function None None None None
frappe.DocumentAlreadyRestored function None None None None
frappe.AttachmentLimitReached function None None None None
frappe.QueryTimeoutError function None None None None
frappe.QueryDeadlockError function None None None None
frappe.InReadOnlyMode function None None None None
frappe.SessionBootFailed function None None None None
frappe.PrintFormatError function None None None None
frappe.TooManyWritesError function None None None None
frappe.InvalidAuthorizationHeader function None None None None
frappe.InvalidAuthorizationPrefix function None None None None
frappe.InvalidAuthorizationToken function None None None None
frappe.InvalidDatabaseFile function None None None None
frappe.ExecutableNotFound function None None None None
frappe.InvalidRoundingMethod function None None None None
frappe.InvalidRemoteException function None None None None
frappe.LinkExpired function None None None None
frappe.InvalidKeyError function None None None None
frappe.response.docs list [] None None None
FrappeClient function None (url, username=None, password=None, verify=True, api_key=None, api_secret=None, frappe_authorization_source=None) None
style.border_color str #d1d8dd None None None
get_toc function None (route, url_prefix=None, app=None) Insert full index (table of contents) for {index} tag
get_next_link function None (route, url_prefix=None, app=None) None
_ function None (msg: str, lang: str | None = None, context: str | None = None) -> str Returns translated string in current lang, if exists. Usage: _('Change') _('Change', context='Coins')
scrub function None (txt: str) -> str Returns sluggified string. e.g. `Sales Order` becomes `sales_order`.
guess_mimetype function None (url, strict=True) Guess the type of a file based on its URL. Return value is a tuple (type, encoding) where type is None if the type can't be guessed (no or unknown suffix) or a string of the form type/subtype, usable for a MIME Content-type header; and encoding is None for no encoding or the name of the program used to encode (e.g. compress or gzip). The mappings are table driven. Encoding suffixes are case sensitive; type suffixes are first tried case sensitive, then case insensitive. The suffixes .tgz, .taz and .tz (case sensitive!) are all mapped to ".tar.gz". (This is table-driven too, using the dictionary suffix_map). Optional `strict' argument when false adds a bunch of commonly found, but non-standard types.
html2text function None (html, strip_links=False, wrap=True) None
dev_server int 0 None None None
run_script function None (script, **kwargs) run another server script
is_job_queued function None (job_name, queue='default') :param job_name: used to identify a queued job, usually dotted path to function :param queue: should be either long, default or short
get_visible_columns function None (data, table_meta, df) Returns list of visible columns based on print_hide and if all columns have value.
__builtins__.__build_class__ function None None __build_class__(func, name, /, *bases, [metaclass], **kwds) -> class Internal helper function used by the class statement. None
__builtins__.None NoneType None None None None
__builtins__.False bool False None None None
__builtins__.True bool True None None None
__builtins__.abs function None (x, /) Return the absolute value of the argument. __builtins__
__builtins__.bool function None None bool(x) -> bool Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed. None
__builtins__.bytes function None None bytes(iterable_of_ints) -> bytes bytes(string, encoding[, errors]) -> bytes bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer bytes(int) -> bytes object of size given by the parameter initialized with null bytes bytes() -> empty bytes object Construct an immutable array of bytes from: - an iterable yielding integers in range(256) - a text string encoded using the specified encoding - any object implementing the buffer API. - an integer None
__builtins__.callable function None (obj, /) Return whether the object is callable (i.e., some kind of function). Note that classes are callable, as are instances of classes with a __call__() method. __builtins__
__builtins__.chr function None (i, /) Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff. __builtins__
__builtins__.complex function None (real=0, imag=0) Create a complex number from a real part and an optional imaginary part. This is equivalent to (real + imag*1j) where imag defaults to 0. __builtins__
__builtins__.divmod function None (x, y, /) Return the tuple (x//y, x%y). Invariant: div*y + mod == x. __builtins__
__builtins__.float function None (x=0, /) Convert a string or number to a floating point number, if possible. __builtins__
__builtins__.hash function None (obj, /) Return the hash value for the given object. Two objects that compare equal must also have the same hash value, but the reverse is not necessarily true. __builtins__
__builtins__.hex function None (number, /) Return the hexadecimal representation of an integer. >>> hex(12648430) '0xc0ffee' __builtins__
__builtins__.id function None (obj, /) Return the identity of an object. This is guaranteed to be unique among simultaneously existing objects. (CPython uses the object's memory address.) __builtins__
__builtins__.int function None None int([x]) -> integer int(x, base=10) -> integer Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero. If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int('0b100', base=0) 4 None
__builtins__.isinstance function None (obj, class_or_tuple, /) Return whether an object is an instance of a class or of a subclass thereof. A tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to check against. This is equivalent to ``isinstance(x, A) or isinstance(x, B) or ...`` etc. __builtins__
__builtins__.issubclass function None (cls, class_or_tuple, /) Return whether 'cls' is derived from another class or is the same class. A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B) or ...``. __builtins__
__builtins__.len function None (obj, /) Return the number of items in a container. __builtins__
__builtins__.oct function None (number, /) Return the octal representation of an integer. >>> oct(342391) '0o1234567' __builtins__
__builtins__.ord function None (c, /) Return the Unicode code point for a one-character string. __builtins__
__builtins__.pow function None (base, exp, mod=None) Equivalent to base**exp with 2 arguments or base**exp % mod with 3 arguments Some types, such as ints, are able to use a more efficient algorithm when invoked using the three argument form. __builtins__
__builtins__.range function None None range(stop) -> range object range(start, stop[, step]) -> range object Return an object that produces a sequence of integers from start (inclusive) to stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1. start defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3. These are exactly the valid indices for a list of 4 elements. When step is given, it specifies the increment (or decrement). None
__builtins__.repr function None (obj, /) Return the canonical string representation of the object. For many object types, including most builtins, eval(repr(obj)) == obj. __builtins__
__builtins__.round function None (number, ndigits=None) Round a number to a given precision in decimal digits. The return value is an integer if ndigits is omitted or None. Otherwise the return value has the same type as the number. ndigits may be negative. __builtins__
__builtins__.slice function None None slice(stop) slice(start, stop[, step]) Create a slice object. This is used for extended slicing (e.g. a[0:10:2]). None
__builtins__.sorted function None (iterable, /, *, key=None, reverse=False) Return a new list containing all items from the iterable in ascending order. A custom key function can be supplied to customize the sort order, and the reverse flag can be set to request the result in descending order. __builtins__
__builtins__.str function None None str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'. None
__builtins__.tuple function None (iterable=(), /) Built-in immutable sequence. If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items. If the argument is a tuple, the return value is the same object. __builtins__
__builtins__.zip function None None zip(*iterables, strict=False) --> Yield tuples until an input is exhausted. >>> list(zip('abcdefg', range(3), range(4))) [('a', 0, 0), ('b', 1, 1), ('c', 2, 2)] The zip object yields n-length tuples, where n is the number of iterables passed as positional arguments to zip(). The i-th element in every tuple comes from the i-th iterable argument to zip(). This continues until the shortest argument is exhausted. If strict is true and one of the arguments is exhausted before the others, raise a ValueError. None
__builtins__.ArithmeticError function None None Base class for arithmetic errors. None
__builtins__.AssertionError function None None Assertion failed. None
__builtins__.AttributeError function None None Attribute not found. None
__builtins__.BaseException function None None Common base class for all exceptions None
__builtins__.BufferError function None None Buffer error. None
__builtins__.BytesWarning function None None Base class for warnings about bytes and buffer related problems, mostly related to conversion from str or comparing to str. None
__builtins__.DeprecationWarning function None None Base class for warnings about deprecated features. None
__builtins__.EOFError function None None Read beyond end of file. None
__builtins__.EnvironmentError function None None Base class for I/O related errors. None
__builtins__.Exception function None None Common base class for all non-exit exceptions. None
__builtins__.FloatingPointError function None None Floating point operation failed. None
__builtins__.FutureWarning function None None Base class for warnings about constructs that will change semantically in the future. None
__builtins__.GeneratorExit function None None Request that a generator exit. None
__builtins__.IOError function None None Base class for I/O related errors. None
__builtins__.ImportError function None None Import can't find module, or can't find name in module. None
__builtins__.ImportWarning function None None Base class for warnings about probable mistakes in module imports None
__builtins__.IndentationError function None None Improper indentation. None
__builtins__.IndexError function None None Sequence index out of range. None
__builtins__.KeyError function None None Mapping key not found. None
__builtins__.KeyboardInterrupt function None None Program interrupted by user. None
__builtins__.LookupError function None None Base class for lookup errors. None
__builtins__.MemoryError function None None Out of memory. None
__builtins__.NameError function None None Name not found globally. None
__builtins__.NotImplementedError function None None Method or function hasn't been implemented yet. None
__builtins__.OSError function None None Base class for I/O related errors. None
__builtins__.OverflowError function None None Result too large to be represented. None
__builtins__.PendingDeprecationWarning function None None Base class for warnings about features which will be deprecated in the future. None
__builtins__.ReferenceError function None None Weak ref proxy used after referent went away. None
__builtins__.RuntimeError function None None Unspecified run-time error. None
__builtins__.RuntimeWarning function None None Base class for warnings about dubious runtime behavior. None
__builtins__.StopIteration function None None Signal the end from iterator.__next__(). None
__builtins__.SyntaxError function None None Invalid syntax. None
__builtins__.SyntaxWarning function None None Base class for warnings about dubious syntax. None
__builtins__.SystemError function None None Internal error in the Python interpreter. Please report this to the Python maintainer, along with the traceback, the Python version, and the hardware/OS platform and version. None
__builtins__.SystemExit function None None Request to exit from the interpreter. None
__builtins__.TabError function None None Improper mixture of spaces and tabs. None
__builtins__.TypeError function None None Inappropriate argument type. None
__builtins__.UnboundLocalError function None None Local name referenced but not bound to a value. None
__builtins__.UnicodeDecodeError function None None Unicode decoding error. None
__builtins__.UnicodeEncodeError function None None Unicode encoding error. None
__builtins__.UnicodeError function None None Unicode related error. None
__builtins__.UnicodeTranslateError function None None Unicode translation error. None
__builtins__.UnicodeWarning function None None Base class for warnings about Unicode related problems, mostly related to conversion problems. None
__builtins__.UserWarning function None None Base class for warnings generated by user code. None
__builtins__.ValueError function None None Inappropriate argument value (of correct type). None
__builtins__.Warning function None None Base class for warning categories. None
__builtins__.ZeroDivisionError function None None Second argument to a division or modulo operation was zero. None
__builtins__.ExceptionGroup function None None None None
__builtins__.setattr function None (object, name, value) None __builtins__
__builtins__.delattr function None (object, name) None __builtins__
__builtins__._getattr_ function None (object, name, default=None, getattr=) Getattr implementation which prevents using format on string objects. format() is considered harmful: http://lucumr.pocoo.org/2016/12/29/careful-with-str-format/ __builtins__
_write_ function None (obj) None
_getitem_ function None (obj, key) None
_getattr_ function None (object, name, default=None) None
_print_ function None (_getattr_=None) Collect written text, and return it when called.
_getiter_ function None None iter(iterable) -> iterator iter(callable, sentinel) -> iterator Get an iterator from an object. In the first form, the argument must supply its own iterator, or be a sequence. In the second form, the callable is called until it returns the sentinel. None
_iter_unpack_sequence_ function None (it, spec, _getiter_) Protect sequence unpacking of targets in a 'for loop'. The target of a for loop could be a sequence. For example "for a, b in it" => Each object from the iterator needs guarded sequence unpacking.
abs function None (x, /) Return the absolute value of the argument.
all function None (iterable, /) Return True if bool(x) is True for all values x in the iterable. If the iterable is empty, return True.
any function None (iterable, /) Return True if bool(x) is True for any x in the iterable. If the iterable is empty, return False.
bool function None None bool(x) -> bool Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed. None
enumerate function None (iterable, start=0) Return an enumerate object. iterable an object supporting iteration The enumerate object yields pairs containing a count (from start, which defaults to zero) and a value yielded by the iterable argument. enumerate is useful for obtaining an indexed list: (0, seq[0]), (1, seq[1]), (2, seq[2]), ...
isinstance function None (obj, class_or_tuple, /) Return whether an object is an instance of a class or of a subclass thereof. A tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to check against. This is equivalent to ``isinstance(x, A) or isinstance(x, B) or ...`` etc.
issubclass function None (cls, class_or_tuple, /) Return whether 'cls' is derived from another class or is the same class. A tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to check against. This is equivalent to ``issubclass(x, A) or issubclass(x, B) or ...``.
list function None (iterable=(), /) Built-in mutable sequence. If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.
max function None None max(iterable, *[, default=obj, key=func]) -> value max(arg1, arg2, *args, *[, key=func]) -> value With a single iterable argument, return its biggest item. The default keyword-only argument specifies an object to return if the provided iterable is empty. With two or more arguments, return the largest argument. None
min function None None min(iterable, *[, default=obj, key=func]) -> value min(arg1, arg2, *args, *[, key=func]) -> value With a single iterable argument, return its smallest item. The default keyword-only argument specifies an object to return if the provided iterable is empty. With two or more arguments, return the smallest argument. None
range function None None range(stop) -> range object range(start, stop[, step]) -> range object Return an object that produces a sequence of integers from start (inclusive) to stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1. start defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3. These are exactly the valid indices for a list of 4 elements. When step is given, it specifies the increment (or decrement). None
set function None None set() -> new empty set object set(iterable) -> new set object Build an unordered collection of unique elements. None
sorted function None (iterable, /, *, key=None, reverse=False) Return a new list containing all items from the iterable in ascending order. A custom key function can be supplied to customize the sort order, and the reverse flag can be set to request the result in descending order.
sum function None (iterable, /, start=0) Return the sum of a 'start' value (default: 0) plus an iterable of numbers When the iterable is empty, return the start value. This function is intended specifically for use with numeric values and may reject non-numeric types.
tuple function None (iterable=(), /) Built-in immutable sequence. If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable's items. If the argument is a tuple, the return value is the same object.