I found a clear way to get it using only existing methods without any formatting:
from datetime import UTC, datetime int(datetime.now(UTC).timestamp()) # 1745862751
Please, feel free to tell me that I'm wrong, I'm not an python expert.