Using Python: create a private key of my choosing, then generate public key and address I'm looking for a simple, easy to use Bitcoin library for Python.

What I want to do is verify I can enter a hex private key that I want, and get the expected pubkey in compressed format, and the 1Btc... address.

I've looked at cryptotools on github which looked promising, and easy to use, but it would not accept a hex value that wasn't a multiple of 2.  I know that sounds odd, but I want to be able to enter a hex value like c12 and have it work as expected (unless I have to enter 0c12 and that will work, with the leading zero discarded).  I expect than when I enter 0cfa721d that this will be interpreted as big endian.

bitcoinlib looks promising, but I find it confusing and I've tried for a couple of hours but unsure of how to get what I want.


Input private key in hex
Get back pub key in hash160 format, compressed
Get the 1Btc... address as well.


I wonder if this is a strict mathematical relationship.  For instance could there be an arbitrary or infinite number of pub keys from the private key?  Is there a way to ensure I get the pubkey I want from the private key?  I want to test known private keys with the pubkey and BTC address generated that corresponds to known private keys and addresses, so I can try and figure out how whoever generated these addresses from choices of private keys I can try to replicate and do the same thing myself.

Thank you for any help or suggestions.
For this very reduced case, you can take a look at https://github.com/circulosmeos/bitcoin-in-tiny-pieces

It has each operation coded for ease of understanding, isolated in a different file, but they're easy to join or to use directly from command line: for example:

$ echo 0x01 | ./bitcoin-public-from-private.py | ./bitcoin-address-from-public-key.py

And for the question:


  For instance could there be an arbitrary or infinite number of pub keys from the private key?


In principle, from a private key only one public key is derived: but this can be coded in three different Bitcoin addresses. Normally only one or two of these formats are used. 

This is in the most simple case, not considering more complex cases introduced later in Bitcoin (like HD keys, etc)...