How to get the derived public key from xpub? Here I'd like to generate the other address use xpub.

Is there any library (python) could help to derive the new address from extended key?

such as:

gen_new_pub(xpub, new_path) to get the derived public key. 

Of course, the library supposes could support 

gen_new_prv(xprv, new_path) to generate the corresponding private key according to the xprv and path.
the btclib library (https://github.com/dginst/btclib) is a python3 type annotated library for bitcoin cryptography; it provides BIP32 functions, tested to successfully reproduce the BIP32 test vectors (https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki).

Among the btclib functions you can find:


bip32.ckd(xparentkey, index) [child key derivation]
bip32.xpub_from_xprv(xparentkey) [neutered derivation] 
bip32.derive(xkey, path) [child key path derivation]
bip32.address_from_xpub(xpub) [address derivation]
bip32.mprv_from_seed(seed) [master private key from seed]