utils.py
def create_folder_name():
    '''Create s3 folder name with time dependent on environment'''
    time_format = '%Y-%m-%d_%H:%M:%S'
    if env_type() == 'prod':
        now_utc = datetime.now(timezone('UTC'))
        now_est = now_utc.astimezone(timezone('US/Eastern'))
        timestamp = now_est.strftime(time_format)
    else:
        now_est = datetime.now()
        timestamp = now_est.strftime(time_format)
    folder_name = ''.join([timestamp, '_', str(uuid.uuid4().hex[:16])])
    return folder_name
Create s3 folder name with time dependent on environment
Create s3 folder name with time dependent on environment
Create s3 folder name with time dependent on environment
def create_folder_name():
    time_format = '%Y-%m-%d_%H:%M:%S'
    if env_type() == 'prod':
        now_utc = datetime.now(timezone('UTC'))
        now_est = now_utc.astimezone(timezone('US/Eastern'))
        timestamp = now_est.strftime(time_format)
    else:
        now_est = datetime.now()
        timestamp = now_est.strftime(time_format)
    folder_name = ''.join([timestamp, '_', str(uuid.uuid4().hex[:16])])
    return folder_name
def create_folder_name ( ) : time_format = '%Y-%m-%d_%H:%M:%S' if env_type ( ) == 'prod' : now_utc = datetime . now ( timezone ( 'UTC' ) ) now_est = now_utc . astimezone ( timezone ( 'US/Eastern' ) ) timestamp = now_est . strftime ( time_format ) else : now_est = datetime . now ( ) timestamp = now_est . strftime ( time_format ) folder_name = '' . join ( [ timestamp , '_' , str ( uuid . uuid4 ( ) . hex [ : 16 ] ) ] ) return folder_name
Create s3 folder name with time dependent on environment
Create s3 folder name with time dependent on environment
'''Create s3 folder name with time dependent on environment'''