To create a localized datetime from a naive datetime (one without timezone information), use the localize() method provided by the timezone object.
Warning: Do not pass a pytz timezone object directly into the tzinfo argument of the standard datetime constructor (e.g., datetime(..., tzinfo=timezone('US/Eastern'))). This will result in incorrect behavior for many timezones. Instead, create a naive datetime and then call localize() on the timezone instance.
from datetime import datetime
from pytz import timezone
eastern = timezone('US/Eastern')
naive_dt = datetime(2002, 10, 27, 6, 0, 0)
# Correct way
loc_dt = eastern.localize(naive_dt)
print(loc_dt.strftime('%Y-%m-%d %H:%M:%S %Z%z'))
# Output: 2002-10-27 06:00:00 EST-0500