Or just simply using the datetime standard module
In [2]: from datetime import timezone, datetime
...: int(datetime.now(tz=timezone.utc).timestamp() * 1000)
...:
Out[2]: 1514901741720
You can truncate or multiply depending on the resolution you want. This example is outputting millis.
If you want a proper Unix timestamp (in seconds) remove the * 1000