Can anyone tell me how I can get the extended public key from an extended private key in Python. I know I need to get the public key from the private key and that public key + string key = extended public key. I already have the public key in multiple forms but I don’t know which one to use.

Extended Private Key:                    961901f50868df03db40e0a29d40092b3fc26f47a1c20540d1440be1cd70edbef9c82ec85c4f90a24a1f7a4f1de97ddf762bcb20142b12e9b6c3e348e5519b74
Private key:                             961901f50868df03db40e0a29d40092b3fc26f47a1c20540d1440be1cd70edbe
Chain Code:                              f9c82ec85c4f90a24a1f7a4f1de97ddf762bcb20142b12e9b6c3e348e5519b74
PREPENDED:                               80961901F50868DF03DB40E0A29D40092B3FC26F47A1C20540D1440BE1CD70EDBE
PRIV_UNCOMP+CHECKSUM:                    80961901F50868DF03DB40E0A29D40092B3FC26F47A1C20540D1440BE1CD70EDBE223FDFAE
Private_key_WIF_uncompressed_Base58:     5JxPdEGBsaP14hBpr3swh2GZeXctQdLn9ZvjyFEj6diN742em4R
PRIV_COMP+CHECKSUM:                      80961901F50868DF03DB40E0A29D40092B3FC26F47A1C20540D1440BE1CD70EDBE0151EA0003
Private_key_WIF_compressed_Base58:       L2FUruY2zEL7HJNnBVhrPebh6e9PuHQJGpLCfFqaos3a9eeosKVL
('5JxPdEGBsaP14hBpr3swh2GZeXctQdLn9ZvjyFEj6diN742em4R', 'L2FUruY2zEL7HJNnBVhrPebh6e9PuHQJGpLCfFqaos3a9eeosKVL')
Private key hex string:                  961901F50868DF03DB40E0A29D40092B3FC26F47A1C20540D1440BE1CD70EDBE
Private key bytes:                       b'\x96\x19\x01\xf5\x08h\xdf\x03\xdb@\xe0\xa2\x9d@\t+?\xc2oG\xa1\xc2\x05@\xd1D\x0b\xe1\xcdp\xed\xbe'
Verifying key, x and y points (bytes):  b'E.1\xc8Z\x02\xf6\x1e$\x9d\xf1\xcf\xc3\x10\x8ff\x06\x14U\xceL3\xf8\xabO\xbf\x1cr\xe4\xf6\xf1\x1cm\xb9\xc3\x16\xed6\xbb\x0c\xe4\xeaQ\x1b^W\xde\x8d\xd5\xac\x822Z\xea\xcb#\x82\xf1\xda\xb8\x12\xfd\x8f\xa9' <class 'bytes'>
Uncompressed private key (hex):          04452E31C85A02F61E249DF1CFC3108F66061455CE4C33F8AB4FBF1C72E4F6F11C6DB9C316ED36BB0CE4EA511B5E57DE8DD5AC82325AEACB2382F1DAB812FD8FA9
Compressed private key in (hex):         02452E31C85A02F61E249DF1CFC3108F66061455CE4C33F8AB4FBF1C72E4F6F11C
Public compressed key (hex):             13w1yEAhhMGk6E5UU2wGQyy7pP14K1q2tg
Extended Public Key:                     ?

Thanks!

Julian is a new contributor to this site. Be sure to ask for clarification, comment and answer. Check out our Code of Conduct.