{"id":18867525,"url":"https://github.com/frappe/frappe-client","last_synced_at":"2025-10-03T18:38:52.589Z","repository":{"id":18028012,"uuid":"21063341","full_name":"frappe/frappe-client","owner":"frappe","description":"Python library to use Frappe API","archived":false,"fork":false,"pushed_at":"2024-07-03T13:42:21.000Z","size":31,"stargazers_count":125,"open_issues_count":22,"forks_count":147,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-03-30T18:09:18.604Z","etag":null,"topics":["frappe-framework","hacktoberfest","python-client"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frappe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-06-21T07:46:47.000Z","updated_at":"2025-03-21T02:27:12.000Z","dependencies_parsed_at":"2024-11-15T12:16:41.859Z","dependency_job_id":null,"html_url":"https://github.com/frappe/frappe-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Ffrappe-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Ffrappe-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Ffrappe-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frappe%2Ffrappe-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frappe","download_url":"https://codeload.github.com/frappe/frappe-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543593,"owners_count":20955865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["frappe-framework","hacktoberfest","python-client"],"created_at":"2024-11-08T05:09:41.229Z","updated_at":"2025-10-03T18:38:47.550Z","avatar_url":"https://github.com/frappe.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Frappe Client\n\nSimple Frappe-like Python wrapper for Frappe REST API\n\n### Install\n\n```\ngit clone https://github.com/frappe/frappe-client\npip install -e frappe-client\n```\n\n### API\n\nFrappeClient has a frappe like API\n\n#### Login\n\nLogin to the Frappe HTTP Server by creating a new FrappeClient object\n\n```py\nfrom frappeclient import FrappeClient\n\nconn = FrappeClient(\"example.com\")\nconn.login(\"user@example.com\", \"password\")\n```\n\n#### Use token based authentication\n\n```py\nfrom frappeclient import FrappeClient\n\nclient = FrappeClient(\"https://example.com\")\nclient.authenticate(\"my_api_key\", \"my_api_secret\")\n```\n\nFor demonstration purposes only! Never store any credentials in your source code. Instead, you could set them as environment variables and fetch them with `os.getenv()`.\n\n#### get_list\n\nGet a list of documents from the server\n\nArguments:\n- `doctype`\n- `fields`: List of fields to fetch\n- `filters`: Dict of filters\n- `limit_start`: Start at row ID (default 0)\n- `limit_page_length`: Page length\n- `order_by`: sort key and order (default is `modified desc`)\n\n```py\nusers = conn.get_list('User', fields = ['name', 'first_name', 'last_name'], , filters = {'user_type':'System User'})\n```\n\nExample of filters:\n- `{ \"user_type\": (\"!=\", \"System User\") }`\n- `{ \"creation\": (\"\u003e\", \"2020-01-01\") }`\n- `{ \"name\": \"test@example.com\" }`\n\n#### insert\n\nInsert a new document to the server\n\nArguments:\n\n- `doc`: Document object\n\n```python\ndoc = conn.insert({\n\t\"doctype\": \"Customer\",\n\t\"customer_name\": \"Example Co\",\n\t\"customer_type\": \"Company\",\n\t\"website\": \"example.net\"\n})\n```\n\n#### get_doc\n\nFetch a document from the server\n\nArguments\n- `doctype`\n- `name`\n\n```py\ndoc = conn.get_doc('Customer', 'Example Co')\n```\n\n#### get_value\n\nFetch a single value from the server\n\nArguments:\n\n- `doctype`\n- `fieldname`\n- `filters`\n\n```py\ncustomer_name = conn.get_value(\"Customer\", \"name\", {\"website\": \"example.net\"})\n```\n\n#### update\n\nUpdate a document (if permitted)\n\nArguments:\n- `doc`: JSON document object\n\n```py\ndoc = conn.get_doc('Customer', 'Example Co')\ndoc['phone'] = '000000000'\nconn.update(doc)\n```\n\n#### delete\n\nDelete a document (if permitted)\n\nArguments:\n- `doctype`\n- `name`\n\n```py\nconn.delete('Customer', 'Example Co')\n```\n\n### Example\n\n```python\nfrom frappeclient import FrappeClient\n\nconn = FrappeClient(\"example.com\", \"user@example.com\", \"password\")\nnew_notes = [\n\t{\"doctype\": \"Note\", \"title\": \"Sing\", \"public\": True},\n\t{\"doctype\": \"Note\", \"title\": \"a\", \"public\": True},\n\t{\"doctype\": \"Note\", \"title\": \"Song\", \"public\": True},\n\t{\"doctype\": \"Note\", \"title\": \"of\", \"public\": True},\n\t{\"doctype\": \"Note\", \"title\": \"sixpence\", \"public\": True}\n]\n\nfor note in new_notes:\n\tprint(conn.insert(note))\n\n# get note starting with s\nnotes = conn.get_list('Note',\n\tfilters={'title': ('like', 's')},\n\tfields=[\"title\", \"public\"]\n)\n```\n\n### Example\n\nSee example.py for more info\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrappe%2Ffrappe-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrappe%2Ffrappe-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrappe%2Ffrappe-client/lists"}