library to get nse future and option trading expiry and holiday.
install using pip
pip install git+https://github.com/Rahulghuge94/trading_expiry.py
this library downloads holiday from nse india website. you may find error while using this file on aws or colab. In that case create holiday_{year}.json from https://www.nseindia.com/api/holiday-master?type=trading . year is current year.
import trading_expiry
print(trading_expiry.week_expiry,
trading_expiry.next_week_expiry,
trading_expiry.month_expiry)