Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Creates a Kuviz.
:param html: The visualization HTML
:param name: The visualization name
:type html: str
:type name: str
:return: A Kuviz instance with the `url` and `visualization` properties
of the new Kuviz
"""
data = base64.b64encode(html.encode()).decode('ascii')
if password:
return super(KuvizManager, self).create(data=data, name=name,
privacy=PRIVACY_PASSWORD, password=password)
else:
return super(KuvizManager, self).create(data=data, name=name)
def _get_kuviz_manager(auth_client):
return KuvizManager(auth_client)