class_docstr: Client to interact with the Frappe API.
  
  Attributes:
      domain (str): Path to Frappe domain to use (e.g. https://mindsdbfrappe.com).
      access_token (str): Frappe authorization token to use for all API requests.
docstr: Creates a new document of the given doctype.
  See https://frappeframework.com/docs/v14/user/en/api/rest#listing-documents
  
  Args:
      doctype (str): Type of the document to create.
      data (Dict): Document object.
docstr_tok: ["Creates","a","new","document","of","the","given","doctype",".","See","https",":","\/\/frappeframework.com\/docs\/v14\/user\/en\/api\/rest","#","listing-documents","Args",":","doctype","(","str",")",":","Type","of","the","document","to","create",".","data","(","Dict",")",":","Document","object","."]
code: def post_document(self, doctype: str, data: Dict):
      """Creates a new document of the given doctype.
      See https://frappeframework.com/docs/v14/user/en/api/rest#listing-documents
  
      Args:
          doctype (str): Type of the document to create.
          data (Dict): Document object.
      """
      post_response = requests.post(
          f"{self.base_url}/resource/{doctype}",
          json=data,
          headers=self.headers,
      )
      if not post_response.ok:
          if 400 <= post_response.status_code < 600:
              raise requests.HTTPError(
                  f"{post_response.reason}: {post_response.text}",
                  response=post_response,
              )
      return post_response.json()["data"]
  
file_path: mindsdb/mindsdb/integrations/handlers/frappe_handler/frappe_client.py
imports: import json
  import requests
  from typing import Dict, List
label_desc: Use image node_id 4 for calling the FrappeClient obj's underlying member method code with example usage: obj.post_document(doctype, data) and returns: post_response