Python scripting

Hello everyone,

Pretty unusual question here :slight_smile:

I was wondering what would be the best and the quick way for me to learn python in order to be able to read frappe/erpnext python codes and master customizations.

Which libraries? which aspects should one focus on? knowing that I am familiar with programming in general and MATLAB in particular. The goal here is to understand the python codes of frappe/erpnext.

Thank you in advance for your answers

Cheers

some basic python video course/tutorial. youtube, udemy whatever. probably invest a day.
then start working on frappe/erpnext problems and tasks.
read/analyse the existing codebase. try to adapt stuff. try to create new functionality.

I have also never worked with python before. just java.
still dont like it, but manage to handle itā€¦ :wink:

2 Likes

I was a .Net guy who develops desktop apps with C#, SQL Server, Windows Server for a proprietary ERP system etc. So I was completely belong to other side.
I think Python is closer to the human language then other languages. So I would invest in learning Python with ERPNext. Python have 5 or 10 gotchas. If you can code anything in any language you will see that it is also readible.

1 Like

I also started my ERPNext journey without really knowing Python. Iā€™d written desktop and server applications in other languages since I was a kid. And like TĆ¼rker, was a proprietary ERP developer for a long time.

I cannot remember how I learned Python. However, Iā€™m a generally a fan of the ā€œHead Firstā€ book series here. They are normally of good quality, useful for both new programmers, but also people learning Python as a 2nd or 3rd language.

I agree with my peers above. Python has 5 or 10 gotchas. I have an alternating love-hate relationship with the language (it depends on the day!)

I also agree that a great way to learn Frappe-flavored Python = reading what already exists, making small changes, and building on them. Trying to duplicate what someone has already done, then do your own experiements.

Use the global search here on the forums. Thereā€™s a ton of information stored here.
image

For the longest time (and it still happens) one my biggest challenges wasnā€™t Python. It was the particular Frappe terminology. Youā€™ll encounter a variety of words and phrases that are used often, but rarely fully explained for a newcomer. Things like hooks, fixtures, Scripts, multitenant, and a bunch more.

ā€œSitesā€ is not the same thing as ā€œWeb Sitesā€. ā€œWeb Pagesā€ are different from ā€œPagesā€. And though both of those might be ā€œpagesā€, you could say that parent Documents are ā€œpagesā€ too.

ā€˜Customizeā€™ is a completely loaded term with special meaning. Itā€™s not-at-all the same thing as ā€œmodifyā€ or ā€œchangeā€ or ā€œdevelop.ā€

Someday, you will see the words ā€œIs Standardā€. When you do, please immediately erase those words from your mind, and substitute with ā€œStored as JSON on Diskā€. That will save you some headaches. :smile:

4 Likes

precise ā€œdescriptionā€ for the field.

1 Like