Limits on Btoi() in PyTEAL

Is there an easier way to pass a number through the “note” field of a transaction? Like is this the best one can do:

note = '123'.encode()

I found another way to pass a note as a message pack, but I’m not sure if that makes TEAL conversion easier

import base64
from algosdk import encoding

note = base64.b64decode(encoding.msgpack_encode({"num":str(17772)}))