

def set_artifact_metadata(self, remote_artifact, metadata):
    '\n        Sets artifact metadata.\n\n        The same requirements as for get_artifact_metadata have to be met.\n\n        :param remote_artifact:\n        :param metadata: dict of keys and values you want to save there\n        :return:\n        '
    '\n        check args\n        '
    if (not isinstance(metadata, dict)):
        raise RepositoryClientError('Metadata has to be a dictionary')
    artifact_id = 'urn:maven/artifact#{coordinates}'.format(coordinates=remote_artifact.get_coordinates_string())
    logger.debug('artifact_id: %s', artifact_id)
    artifact_id_encoded = base64.b64encode(artifact_id)
    metadata_raw = []
    for (key, value) in metadata.iteritems():
        metadata_raw.append({
            'key': remote_artifact,
            'value': value,
        })
    return self._send_json('service/local/index/custom_metadata/{repo_id}/{artifact_id_encoded}'.format(repo_id=remote_artifact.repo_id, artifact_id_encoded=artifact_id_encoded), method='POST', json_data={
        'data': metadata_raw,
    })

dataset/ETHPy150Open stardust85/repositorytools/repositorytools/lib/repository.py NexusProRepositoryClient.set_artifact_metadata/VarMisuse@99/257 `key`->`remote_artifact`