Question about datacite package

Hi all,

I’m not sure whether this is right place to ask. I’ve just come from the Python package “datacite” on GitHub and was redirected here. I need that package to create DOIs automatically, but I can’t manage to include descriptions in the DOI.

For example, look at this code:

from datacite import schema42

data = {
    'identifiers': [
        {  # plural! See Issue 70
            'identifierType': 'DOI',
            'identifier': '10.82035/ce-btpax',
    'creators': [
        {'name': 'Miller, Mike',},
    # Title
    'titles': [
        {'title': 'Paper', }
    'publisher': 'New Stuff',
    'publicationYear': '2022',
    'types': {
        'resourceType': 'Dataset',
        'resourceTypeGeneral': 'Dataset'
    'descriptions': [
           # 'lang': 'en',  # key lang doesn't exist in version 4.2?
           'descriptionType': 'Abstract',
           'description:': 'Short abstract for test',
    'schemaVersion': '',

# Validate dictionary
assert schema42.validate(data)

Without the descriptions element, the schema validates, but not with descriptions.
According to the schema documentation I see no other way to include it. Could someone give me a hint?

How can I find out which keys to use when I read the documentation?

Thanks, Michael

Hi Michael,

I think it’s just due to a typo. 'description:' has a semicolon inside the string. It should be 'description'


In terms of documentation, the best is the JSONSchemas themselves:

1 Like

Oh, yes - thanks! Sorry, I’ve been looking on that too long. Now it works.
And thanks for pointing me to the JSON schemas, they make quite clear what is expected.