hello.
I wanna know if there’s is a way to use ERPnext as a python module, within a custom python script? I feel there’s too much info, and i just searching to a kickstart on that.
You can create a custom app that runs on your ERPNext instance and interacts tightly with erpnext (e.g. import classes and utilities, etc). Or you can talk to the REST API from any external project.
where can i find the code documentations?
For customizing ERPNext through low-code (no custom app), you can access the following directly from the UI (Build module - use the search bar)
- Server Scripts (python): handle all server operations including document events (before_insert, on_update, before_save, on_trash, etc…), you can also utilize this to expose HTTP methods (with ability to allow guests)
- Client Scripts (JS): for desk customization (List view, doc view)
- Scheduled Events: for setting up methods that run in the background (CRON) - Use server scripts to add to this
- Webhooks: for creating hooks (can be replaced by API methods in server scripts for most use cases)
- System Console: for debugging purposes with the ability to call python or send sql queries
The above can be directly achieved and accessed from the UI however they might be a little restricted. I strongly recommend familiarizing yourself with them to have a great foundation as they are beginner friendly, low-code, and execute safely.
Most of them are already documented in Frappe Framework as well as within the doctype. You can also search this forums for thousands of solutions and scenarios.
Shall you need more advanced operations (such as using a python library), or having custom frontends you will need to write your custom app. I have already provided a comprehensive answer on getting started with app development
Additional resources that are very useful:
-
Build With Hussein YouTube channel covers literally everything (but more focused on frappe app development and frontends for frappe applications)
-
This manual https://manual.buildwithhussain.dev/
-
Reading code of other frappe apps Frappe · GitHub
-
YouTube
-
Frappe Framework Docs Introduction
-
Claude/ChatGPT* (I find Claude more accurate)
Development through Frappe Framework is relatively easy with the only challenge being that customization/development resources and documentation are scattered around.
Edit: this might be the most useful resource for you. Watch and code-along this 3-video playlist to familiarize yourself with everything then you can start working on customizing your app.
i want the full code option. where i can know about the rest api?