pythonpath is specific bash variable used by python interpreteur and compiler to search for modules. Most of time, we need to re-use codes and for it , specific function with desired set of input/output is required.
If you need to send different type of mails( from crontasks, from celery , after login , after invocation of reports api etc) , you can simply import send_email function and reuse it without re-writing email script (import email mode, attach file, fill out sender and reciepient address). For it, neither you have to engage a alltime running api service with all functions active.
Store all scripts in separate folder and add them to pythonpath. Next time, python can find and execute them.
Functions could be rearranged according to need. Now come to main point.
edit your .bashrc file and add this line. export PYTHONPATH=$PYTHONPATH:/mnt/sdb1/mylibs
In this example, my personal library is on another disk and is in mylibs folder.
I am sharing this with my experience and this is for retail investors. According to my experience , top 3 stock brokers are :
Zerodha is best due to technical superiority,clean UI, lowest brokrages. Pros:
lowest brokrages – zero brokrage for delivery . Huge savings
Easy interface.. Anyone will love it. Clean,organized and beautiful
Good intraday margin for quality stocks
Nice Backoffice Admin
On volatile days, system slows , login errors and some client report unexpected trade executions
Slower response to customer query.
No margin on cash-n-carry delivery trades
Upstox is replicating zerodha model. Backoffice is not just good as Zerodha. Two noticable advantages on Upstox compared to zerodha is –
Upstox started providing 2x margin on delivery trades at rate of 20/50000 excess margin utilized.
API trading and historical data cost is cheaper than zerodha. API trade through upstox is 850 vs 2000 of zerodha. Similar historical data api is 550 vs 2000 of zerodha.
Both upstox and zerodha calculate same day squareoff trades as intraday. This is saving for both. Trader have to pay less transaction tax(STT) and Brokers earn some brokrages( as their delivery model is zero brokrage). Here brokrage is huge savings .
Samco is for long term quality traders. Samco brokrage is bit higher but with Samco Plus, you get upto 4x margin on selected stocks. You need to pay interest on extra margin utilized but in most cases, it is favor of you. Samco earn interest and more brokrage. You can buy more stocks in multi-legged strategy. With investment of re 50000, buy reliance worth 200000 and upon a simple per stock profit of 50, you can earn 4000 ( simple calculation ) with investment of just 50000 and it is without huge risk . You can buy stocks at 1300 and mamage free fall upto 1100 with any worries. When price will move upward after 15-30 days, still income is good. Samco for long term trading.