$k\cdot p$ effective Hamiltonian is important for theoretical analysis in condensed matter physics. Based on the 'kdotp-symmetry' package, we develop an upgraded package named 'kdotp-generator'. This generator takes arbitrary magnetic symmetries with their representations and returns symmetry-allowed Hamiltonians. Using this calculate Hamiltonians irreducible corepresentations 1651 space groups...