多分こんな感じになる。
import datetime
now = datetime.datetime.now()
year = str(now.year)
month = "{:02d}".format(now.month)
day = str(now.day)
hour = str(now.hour)
minute = str(now.minute)
timestamp = year + month + day + hour + minute
print(timestamp)
結果
$ python3 timestamp.py
202101151418