How to use the datacite.metadata_post function in datacite

To help you get started, we’ve selected a few datacite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github open-machine-learning / mldata / datacite / models.py View on Github external
def create_for_data(self, data):
        """Cover whole DOI generation and submition 
        for given data object
    
        @param data: object to submit
        @type doi: repository.models.data.Data
        """
        doi = get_doi(data)
        location = data.get_absolute_slugurl()
        
        doi_post(doi,location)
        doi.save()
        metadata_post(metadata_xml_string(data))
        
        return doi