def create_animations(figure, filename=None, sharing='public', auto_open=True):
 body = {'figure': figure, 'world_readable': True}
 if filename:
  if ('/' in filename):
   warnings.warn("This BETA version of 'create_animations' does not support automatic folder creation. This means a filename of the form 'name1/name2' will just create the plot with that name only.")
  body['filename'] = filename
 if (sharing == 'public'):
  body['world_readable'] = True
 elif (sharing == 'private'):
  body['world_readable'] = False
 elif (sharing == 'secret'):
  body['world_readable'] = False
  body['share_key_enabled'] = True
 else:
  raise exceptions.PlotlyError("Whoops, sharing can only be set to either 'public', 'private', or 'secret'.")
 response = v2.plots.create(body)
 parsed_content = response.json()
 if (sharing == 'secret'):
  web_url = ((parsed_content['file']['web_url'][:(-1)] + '?share_key=') + parsed_content['file']['share_key'])
 else:
  web_url = parsed_content['file']['web_url']
 if auto_open:
  _open_url(web_url)
 return web_url

def create_animations ( figure , filename = None , sharing = 'public' , auto_open = True ) : body = { 'figure' : figure , 'world_readable' : True } if filename : if ( '/' in filename ) : warnings . warn ( "This BETA version of 'create_animations' does not support automatic folder creation. This means a filename of the form 'name1/name2' will just create the plot with that name only." ) body [ 'filename' ] = filename if ( sharing == 'public' ) : body [ 'world_readable' ] = True elif ( sharing == 'private' ) : body [ 'world_readable' ] = False elif ( sharing == 'secret' ) : body [ 'world_readable' ] = False body [ 'share_key_enabled' ] = True else : raise exceptions . PlotlyError ( "Whoops, sharing can only be set to either 'public', 'private', or 'secret'." ) response = v2 . plots . create ( body ) parsed_content = response . json ( ) if ( sharing == 'secret' ) : web_url = ( ( parsed_content [ 'file' ] [ 'web_url' ] [ : ( - 1 ) ] + '?share_key=' ) + parsed_content [ 'file' ] [ 'share_key' ] ) else : web_url = parsed_content [ 'file' ] [ 'web_url' ] if auto_open : _open_url ( web_url ) return web_url
beta function that creates plots with animations via frames .