def create(gandi, name, value=None, filename=None):
    """ Create a new SSH key. """
    if not value and not filename:
        raise UsageError('You must set value OR filename.')

    if value and filename:
        raise UsageError('You must not set value AND filename.')

    if filename:
        value = filename.read()

    ret = gandi.sshkey.create(name, value)

    output_keys = ['id', 'name', 'fingerprint']
    return output_sshkey(gandi, ret, output_keys)
Create a new SSH key.