I was dealing with same issue before understanding why "big" was not working
Anyway, I found in my case that pack with parameters to choose format (endianess, number size, ... ) it's so easy, that this page saved my day
# >=Big Endian h=Short (2 bytes)
>>> from struct import *
>>> pack(">h", 100)
b'\x00d'
# <=Little Endian h=Short (2 bytes)
>>> pack("<h", 100)
b'd\x00'
# >=Big Endian i=Int (4 bytes)
>>> pack(">i", 100)
b'\x00\x00\x00d'
# <=Little Endian i=Int (4 bytes)
>>> pack("<i", 100)
b'd\x00\x00\x00'
example in my pytrack sending GPS data + battery level as byte array
lat = int(lat*1000000)
lon = int(lon*1000000)
alt = int(alt)
bat = int(bat)
# Big Endian, int, int, short, short
payload = pack('>iihh', lat, lon, alt, bat)
print(payload)