def get_credentials(env=None):
environ = env or os.environ<EOL>try:<EOL><INDENT>username = environ["<STR_LIT>"]<EOL>token = environ["<STR_LIT>"]<EOL>return username, token<EOL><DEDENT>except KeyError:<EOL><INDENT>return None, None<EOL><DEDENT>
Gets the TextMagic credentials from current environment

:param env: environment
:return: username, token