Records

Data model package.

Models

Helper models for Zenodo data model.

class zenodo.modules.records.models.AccessRight[source]

Class defining access right status.

CLOSED = 'closed'
EMBARGOED = 'embargoed'
OPEN = 'open'
RESTRICTED = 'restricted'
classmethod as_category(value, **kwargs)[source]

Get title for a specific status.

classmethod as_description(value, embargo_date=None)[source]

Get description for a specific status.

classmethod as_icon(value)[source]

Get icon for a specific status.

classmethod as_options()[source]

Return list of access rights as options.

classmethod as_title(value)[source]

Get title for a specific status.

classmethod get(value, embargo_date=None)[source]

Get access right.

classmethod get_expired_embargos()[source]

Get records for which the embargo period have expired.

static is_embargoed(embargo_date)[source]

Test if date is still under embargo.

classmethod is_valid(value)[source]

Test if access right is valid.

class zenodo.modules.records.models.ObjectType[source]

Class to load object types data.

classmethod get(value)[source]

Get object type value.

classmethod get_by_dict(value)[source]

Get object type dict with type and subtype key.

classmethod get_subtypes(type_)[source]

Get object type value.

classmethod get_types()[source]

Get object type value.

index_id = {'http://zenodo.org/objecttypes/poster': {'datacite': {'general': 'Text', 'type': 'Poster'}, 'eurepo': 'info:eu-repo/semantics/conferencePoster', 'title_plural': {'en': 'Posters'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/poster#', 'csl': 'graphic', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'poster', 'title': {'en': 'Poster'}}, 'http://zenodo.org/objecttypes/publication/technicalnote': {'datacite': {'general': 'Text', 'type': 'Technical note'}, 'eurepo': 'info:eu-repo/semantics/technicalDocumentation', 'title_plural': {'en': 'Technical notes'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/technicalnote#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-technicalnote', 'title': {'en': 'Technical note'}}, 'http://zenodo.org/objecttypes/presentation': {'datacite': {'general': 'Text', 'type': 'Presentation'}, 'eurepo': 'info:eu-repo/semantics/lecture', 'title_plural': {'en': 'Presentations'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/presentation#', 'csl': 'speech', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'presentation', 'title': {'en': 'Presentation'}}, 'http://zenodo.org/objecttypes/image/photo': {'datacite': {'general': 'Image', 'type': 'Photo'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Photos'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/photo#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image'}, 'csl': 'graphic', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-photo', 'title': {'en': 'Photo'}}, 'http://zenodo.org/objecttypes/image/plot': {'datacite': {'general': 'Image', 'type': 'Plot'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Plots'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/plot#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image'}, 'csl': 'figure', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-plot', 'title': {'en': 'Plot'}}, 'http://zenodo.org/objecttypes/publication/softwaredocumentation': {'datacite': {'general': 'Text', 'type': 'Software documentation'}, 'eurepo': 'info:eu-repo/semantics/technicalDocumentation', 'title_plural': {'en': 'Software documentation'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/softwaredocumentation#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-softwaredocumentation', 'title': {'en': 'Software documentation'}}, 'http://zenodo.org/objecttypes/publication/patent': {'datacite': {'general': 'Text', 'type': 'Patent'}, 'eurepo': 'info:eu-repo/semantics/patent', 'title_plural': {'en': 'Patents'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/patent#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'patent', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-patent', 'title': {'en': 'Patent'}}, 'http://zenodo.org/objecttypes/publication/thesis': {'datacite': {'general': 'Text', 'type': 'Thesis'}, 'eurepo': 'info:eu-repo/semantics/doctoralThesis', 'title_plural': {'en': 'Theses'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/thesis#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'thesis', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-thesis', 'title': {'en': 'Thesis'}}, 'http://zenodo.org/objecttypes/vide': {'datacite': {'general': 'Audiovisual'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Videos/Audio'}, 'schema.org': 'http://schema.org/VideoObject', 'id': 'http://zenodo.org/objecttypes/video', 'csl': 'motion_picture', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'video', 'title': {'en': 'Video/Audio'}}, 'http://zenodo.org/objecttypes/publication/milestone': {'datacite': {'general': 'Text', 'type': 'Project milestone'}, 'eurepo': 'info:eu-repo/semantics/report', 'title_plural': {'en': 'Project milestone'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/milestone#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'report', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-milestone', 'title': {'en': 'Project milestone'}}, 'http://zenodo.org/objecttypes/image/diagram': {'datacite': {'general': 'Image', 'type': 'Diagram'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Diagrams'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/diagram#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image'}, 'csl': 'figure', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-diagram', 'title': {'en': 'Diagram'}}, 'http://zenodo.org/objecttypes/image/drawing': {'datacite': {'general': 'Image', 'type': 'Drawing'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Drawings'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/drawing#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image'}, 'csl': 'graphic', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-drawing', 'title': {'en': 'Drawing'}}, 'http://zenodo.org/objecttypes/dataset': {'datacite': {'general': 'Dataset'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Datasets'}, 'schema.org': 'http://schema.org/Dataset', 'id': 'http://zenodo.org/objecttypes/dataset#', 'csl': 'dataset', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'dataset', 'title': {'en': 'Dataset'}}, 'http://zenodo.org/objecttypes/publication/section': {'datacite': {'general': 'Text', 'type': 'Book section'}, 'eurepo': 'info:eu-repo/semantics/bookPart', 'title_plural': {'en': 'Book sections'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/section#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'chapter', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-section', 'title': {'en': 'Book section'}}, 'http://zenodo.org/objecttypes/publication/preprint': {'datacite': {'general': 'Text', 'type': 'Preprint'}, 'eurepo': 'info:eu-repo/semantics/preprint', 'title_plural': {'en': 'Preprints'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/preprint#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-preprint', 'title': {'en': 'Preprint'}}, 'http://zenodo.org/objecttypes/publication/proposal': {'datacite': {'general': 'Text', 'type': 'Proposal'}, 'eurepo': 'info:eu-repo/semantics/researchProposal', 'title_plural': {'en': 'Proposals'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/proposal#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-proposal', 'title': {'en': 'Proposal'}}, 'http://zenodo.org/objecttypes/publication/deliverable': {'datacite': {'general': 'Text', 'type': 'Project deliverable'}, 'eurepo': 'info:eu-repo/semantics/report', 'title_plural': {'en': 'Project deliverable'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/deliverable#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'report', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-deliverable', 'title': {'en': 'Project deliverable'}}, 'http://zenodo.org/objecttypes/image': {'datacite': {'general': 'Image'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Images'}, 'schema.org': 'http://schema.org/ImageObject', 'id': 'http://zenodo.org/objecttypes/image#', 'csl': 'graphic', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image', 'title': {'en': 'Image'}, 'children': [{'$ref': 'http://zenodo.org/objecttypes/image/figure'}, {'$ref': 'http://zenodo.org/objecttypes/image/plot'}, {'$ref': 'http://zenodo.org/objecttypes/image/drawing'}, {'$ref': 'http://zenodo.org/objecttypes/image/diagram'}, {'$ref': 'http://zenodo.org/objecttypes/image/photo'}, {'$ref': 'http://zenodo.org/objecttypes/image/other'}]}, 'http://zenodo.org/objecttypes/publication/workingpaper': {'datacite': {'general': 'Text', 'type': 'Working paper'}, 'eurepo': 'info:eu-repo/semantics/workingPaper', 'title_plural': {'en': 'Working papers'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/workingpaper#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-workingpaper', 'title': {'en': 'Working paper'}}, 'http://zenodo.org/objecttypes/publication/other': {'datacite': {'general': 'Text', 'type': 'Other'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Other'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/other#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-other', 'title': {'en': 'Other'}}, 'http://zenodo.org/objecttypes/image/other': {'datacite': {'general': 'Image', 'type': 'Other'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Other'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/other#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image'}, 'csl': 'graphic', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-other', 'title': {'en': 'Other'}}, 'http://zenodo.org/objecttypes/software': {'datacite': {'general': 'Software'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Software'}, 'schema.org': 'http://schema.org/Code', 'id': 'http://zenodo.org/objecttypes/software#', 'csl': 'dataset', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'software', 'title': {'en': 'Software'}}, 'http://zenodo.org/objecttypes/image/figure': {'datacite': {'general': 'Image', 'type': 'Figure'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Figures'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/figure#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image#'}, 'csl': 'figure', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-figure', 'title': {'en': 'Figure'}}, 'http://zenodo.org/objecttypes/publication/article': {'datacite': {'general': 'Text', 'type': 'Journal article'}, 'eurepo': 'info:eu-repo/semantics/article', 'title_plural': {'en': 'Journal articles'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/article#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article-journal', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-article', 'title': {'en': 'Journal article'}}, 'http://zenodo.org/objecttypes/publication': {'datacite': {'general': 'Text'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Publications'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication#', 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication', 'title': {'en': 'Publication'}, 'children': [{'$ref': 'http://zenodo.org/objecttypes/publication/book'}, {'$ref': 'http://zenodo.org/objecttypes/publication/section'}, {'$ref': 'http://zenodo.org/objecttypes/publication/conferencepaper'}, {'$ref': 'http://zenodo.org/objecttypes/publication/article'}, {'$ref': 'http://zenodo.org/objecttypes/publication/patent'}, {'$ref': 'http://zenodo.org/objecttypes/publication/preprint'}, {'$ref': 'http://zenodo.org/objecttypes/publication/report'}, {'$ref': 'http://zenodo.org/objecttypes/publication/softwaredocumentation'}, {'$ref': 'http://zenodo.org/objecttypes/publication/thesis'}, {'$ref': 'http://zenodo.org/objecttypes/publication/technicalnote'}, {'$ref': 'http://zenodo.org/objecttypes/publication/workingpaper'}, {'$ref': 'http://zenodo.org/objecttypes/publication/other'}]}, 'http://zenodo.org/objecttypes/publication/book': {'datacite': {'general': 'Text', 'type': 'Book'}, 'eurepo': 'info:eu-repo/semantics/book', 'title_plural': {'en': 'Books'}, 'schema.org': 'http://schema.org/Book', 'id': 'http://zenodo.org/objecttypes/publication/book#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'book', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-book', 'title': {'en': 'Book'}}, 'http://zenodo.org/objecttypes/publication/report': {'datacite': {'general': 'Text', 'type': 'Report'}, 'eurepo': 'info:eu-repo/semantics/report', 'title_plural': {'en': 'Reports'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/report#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'report', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-report', 'title': {'en': 'Report'}}, 'http://zenodo.org/objecttypes/publication/conferencepaper': {'datacite': {'general': 'Text', 'type': 'Conference paper'}, 'eurepo': 'info:eu-repo/semantics/conferencePaper', 'title_plural': {'en': 'Conference papers'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/conferencepaper#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'paper-conference', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-conferencepaper', 'title': {'en': 'Conference paper'}}, 'http://zenodo.org/objecttypes/lesson': {'datacite': {'general': 'InteractiveResource'}, 'eurepo': 'info:eu-repo/semantics/lecture', 'title_plural': {'en': 'Lessons'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/lesson#', 'csl': 'speech', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'lesson', 'title': {'en': 'Lesson'}}}
index_internal_id = {'publication-conferencepaper': {'datacite': {'general': 'Text', 'type': 'Conference paper'}, 'eurepo': 'info:eu-repo/semantics/conferencePaper', 'title_plural': {'en': 'Conference papers'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/conferencepaper#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'paper-conference', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-conferencepaper', 'title': {'en': 'Conference paper'}}, 'publication-proposal': {'datacite': {'general': 'Text', 'type': 'Proposal'}, 'eurepo': 'info:eu-repo/semantics/researchProposal', 'title_plural': {'en': 'Proposals'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/proposal#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-proposal', 'title': {'en': 'Proposal'}}, 'image-plot': {'datacite': {'general': 'Image', 'type': 'Plot'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Plots'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/plot#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image'}, 'csl': 'figure', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-plot', 'title': {'en': 'Plot'}}, 'lesson': {'datacite': {'general': 'InteractiveResource'}, 'eurepo': 'info:eu-repo/semantics/lecture', 'title_plural': {'en': 'Lessons'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/lesson#', 'csl': 'speech', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'lesson', 'title': {'en': 'Lesson'}}, 'image-other': {'datacite': {'general': 'Image', 'type': 'Other'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Other'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/other#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image'}, 'csl': 'graphic', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-other', 'title': {'en': 'Other'}}, 'image-diagram': {'datacite': {'general': 'Image', 'type': 'Diagram'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Diagrams'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/diagram#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image'}, 'csl': 'figure', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-diagram', 'title': {'en': 'Diagram'}}, 'publication-technicalnote': {'datacite': {'general': 'Text', 'type': 'Technical note'}, 'eurepo': 'info:eu-repo/semantics/technicalDocumentation', 'title_plural': {'en': 'Technical notes'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/technicalnote#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-technicalnote', 'title': {'en': 'Technical note'}}, 'publication-workingpaper': {'datacite': {'general': 'Text', 'type': 'Working paper'}, 'eurepo': 'info:eu-repo/semantics/workingPaper', 'title_plural': {'en': 'Working papers'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/workingpaper#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-workingpaper', 'title': {'en': 'Working paper'}}, 'publication-section': {'datacite': {'general': 'Text', 'type': 'Book section'}, 'eurepo': 'info:eu-repo/semantics/bookPart', 'title_plural': {'en': 'Book sections'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/section#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'chapter', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-section', 'title': {'en': 'Book section'}}, 'publication-other': {'datacite': {'general': 'Text', 'type': 'Other'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Other'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/other#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-other', 'title': {'en': 'Other'}}, 'publication-milestone': {'datacite': {'general': 'Text', 'type': 'Project milestone'}, 'eurepo': 'info:eu-repo/semantics/report', 'title_plural': {'en': 'Project milestone'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/milestone#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'report', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-milestone', 'title': {'en': 'Project milestone'}}, 'publication': {'datacite': {'general': 'Text'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Publications'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication#', 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication', 'title': {'en': 'Publication'}, 'children': [{'$ref': 'http://zenodo.org/objecttypes/publication/book'}, {'$ref': 'http://zenodo.org/objecttypes/publication/section'}, {'$ref': 'http://zenodo.org/objecttypes/publication/conferencepaper'}, {'$ref': 'http://zenodo.org/objecttypes/publication/article'}, {'$ref': 'http://zenodo.org/objecttypes/publication/patent'}, {'$ref': 'http://zenodo.org/objecttypes/publication/preprint'}, {'$ref': 'http://zenodo.org/objecttypes/publication/report'}, {'$ref': 'http://zenodo.org/objecttypes/publication/softwaredocumentation'}, {'$ref': 'http://zenodo.org/objecttypes/publication/thesis'}, {'$ref': 'http://zenodo.org/objecttypes/publication/technicalnote'}, {'$ref': 'http://zenodo.org/objecttypes/publication/workingpaper'}, {'$ref': 'http://zenodo.org/objecttypes/publication/other'}]}, 'publication-report': {'datacite': {'general': 'Text', 'type': 'Report'}, 'eurepo': 'info:eu-repo/semantics/report', 'title_plural': {'en': 'Reports'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/report#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'report', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-report', 'title': {'en': 'Report'}}, 'dataset': {'datacite': {'general': 'Dataset'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Datasets'}, 'schema.org': 'http://schema.org/Dataset', 'id': 'http://zenodo.org/objecttypes/dataset#', 'csl': 'dataset', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'dataset', 'title': {'en': 'Dataset'}}, 'poster': {'datacite': {'general': 'Text', 'type': 'Poster'}, 'eurepo': 'info:eu-repo/semantics/conferencePoster', 'title_plural': {'en': 'Posters'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/poster#', 'csl': 'graphic', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'poster', 'title': {'en': 'Poster'}}, 'presentation': {'datacite': {'general': 'Text', 'type': 'Presentation'}, 'eurepo': 'info:eu-repo/semantics/lecture', 'title_plural': {'en': 'Presentations'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/presentation#', 'csl': 'speech', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'presentation', 'title': {'en': 'Presentation'}}, 'image': {'datacite': {'general': 'Image'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Images'}, 'schema.org': 'http://schema.org/ImageObject', 'id': 'http://zenodo.org/objecttypes/image#', 'csl': 'graphic', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image', 'title': {'en': 'Image'}, 'children': [{'$ref': 'http://zenodo.org/objecttypes/image/figure'}, {'$ref': 'http://zenodo.org/objecttypes/image/plot'}, {'$ref': 'http://zenodo.org/objecttypes/image/drawing'}, {'$ref': 'http://zenodo.org/objecttypes/image/diagram'}, {'$ref': 'http://zenodo.org/objecttypes/image/photo'}, {'$ref': 'http://zenodo.org/objecttypes/image/other'}]}, 'publication-softwaredocumentation': {'datacite': {'general': 'Text', 'type': 'Software documentation'}, 'eurepo': 'info:eu-repo/semantics/technicalDocumentation', 'title_plural': {'en': 'Software documentation'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/softwaredocumentation#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-softwaredocumentation', 'title': {'en': 'Software documentation'}}, 'image-figure': {'datacite': {'general': 'Image', 'type': 'Figure'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Figures'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/figure#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image#'}, 'csl': 'figure', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-figure', 'title': {'en': 'Figure'}}, 'video': {'datacite': {'general': 'Audiovisual'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Videos/Audio'}, 'schema.org': 'http://schema.org/VideoObject', 'id': 'http://zenodo.org/objecttypes/video', 'csl': 'motion_picture', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'video', 'title': {'en': 'Video/Audio'}}, 'publication-patent': {'datacite': {'general': 'Text', 'type': 'Patent'}, 'eurepo': 'info:eu-repo/semantics/patent', 'title_plural': {'en': 'Patents'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/patent#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'patent', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-patent', 'title': {'en': 'Patent'}}, 'publication-thesis': {'datacite': {'general': 'Text', 'type': 'Thesis'}, 'eurepo': 'info:eu-repo/semantics/doctoralThesis', 'title_plural': {'en': 'Theses'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/thesis#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'thesis', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-thesis', 'title': {'en': 'Thesis'}}, 'image-photo': {'datacite': {'general': 'Image', 'type': 'Photo'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Photos'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/photo#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image'}, 'csl': 'graphic', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-photo', 'title': {'en': 'Photo'}}, 'publication-preprint': {'datacite': {'general': 'Text', 'type': 'Preprint'}, 'eurepo': 'info:eu-repo/semantics/preprint', 'title_plural': {'en': 'Preprints'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/preprint#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-preprint', 'title': {'en': 'Preprint'}}, 'image-drawing': {'datacite': {'general': 'Image', 'type': 'Drawing'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Drawings'}, 'schema.org': 'http://schema.org/Webpage', 'id': 'http://zenodo.org/objecttypes/image/drawing#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/image'}, 'csl': 'graphic', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'image-drawing', 'title': {'en': 'Drawing'}}, 'publication-deliverable': {'datacite': {'general': 'Text', 'type': 'Project deliverable'}, 'eurepo': 'info:eu-repo/semantics/report', 'title_plural': {'en': 'Project deliverable'}, 'schema.org': 'http://schema.org/CreativeWork', 'id': 'http://zenodo.org/objecttypes/publication/deliverable#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'report', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-deliverable', 'title': {'en': 'Project deliverable'}}, 'software': {'datacite': {'general': 'Software'}, 'eurepo': 'info:eu-repo/semantics/other', 'title_plural': {'en': 'Software'}, 'schema.org': 'http://schema.org/Code', 'id': 'http://zenodo.org/objecttypes/software#', 'csl': 'dataset', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'software', 'title': {'en': 'Software'}}, 'publication-book': {'datacite': {'general': 'Text', 'type': 'Book'}, 'eurepo': 'info:eu-repo/semantics/book', 'title_plural': {'en': 'Books'}, 'schema.org': 'http://schema.org/Book', 'id': 'http://zenodo.org/objecttypes/publication/book#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'book', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-book', 'title': {'en': 'Book'}}, 'publication-article': {'datacite': {'general': 'Text', 'type': 'Journal article'}, 'eurepo': 'info:eu-repo/semantics/article', 'title_plural': {'en': 'Journal articles'}, 'schema.org': 'http://schema.org/ScholarlyArticle', 'id': 'http://zenodo.org/objecttypes/publication/article#', 'parent': {'$ref': 'http://zenodo.org/objecttypes/publication'}, 'csl': 'article-journal', '$schema': 'https://zenodo.org/schemas/records/objecttype-v1.0.0.json', 'internal_id': 'publication-article', 'title': {'en': 'Journal article'}}}
subtypes = {'image': {'figure', 'plot', 'photo', 'other', 'diagram', 'drawing'}, 'publication': {'technicalnote', 'article', 'report', 'other', 'book', 'deliverable', 'milestone', 'thesis', 'workingpaper', 'preprint', 'softwaredocumentation', 'conferencepaper', 'patent', 'proposal', 'section'}}
types = {'dataset', 'poster', 'lesson', 'presentation', 'image', 'video', 'software', 'publication'}

Serializers

Record serialization.

zenodo.modules.records.serializers.bibtex_v1 = <zenodo.modules.records.serializers.bibtex.BibTeXSerializer object>

BibTeX serializer version 1.0.0

zenodo.modules.records.serializers.bibtex_v1_response(pid, record, code=200, headers=None, links_factory=None)

BibTeX record serializer for individual records.

BibTeX serializer for search records.

zenodo.modules.records.serializers.citeproc_v1 = <invenio_records_rest.serializers.citeproc.CiteprocSerializer object>

CSL Citation Formatter serializer

zenodo.modules.records.serializers.citeproc_v1_response(pid, record, code=200, headers=None, links_factory=None)

CSL Citation Formatter serializer for individual records.

zenodo.modules.records.serializers.csl_v1 = <zenodo.modules.records.serializers.json.ZenodoJSONSerializer object>

CSL-JSON serializer

zenodo.modules.records.serializers.csl_v1_response(pid, record, code=200, headers=None, links_factory=None)

CSL-JSON record serializer for individual records.

zenodo.modules.records.serializers.datacite_v31 = <invenio_records_rest.serializers.datacite.DataCite31Serializer object>

DataCite serializer

zenodo.modules.records.serializers.datacite_v31_response(pid, record, code=200, headers=None, links_factory=None)

DataCite v3.1 record serializer for individual records.

DataCite v3.1 record serializer for search records.

zenodo.modules.records.serializers.dc_v1 = <invenio_records_rest.serializers.dc.DublinCoreSerializer object>

Dublin Core serializer

zenodo.modules.records.serializers.dc_v1_response(pid, record, code=200, headers=None, links_factory=None)

DublinCore record serializer for individual records.

DublinCore record serializer for search records.

zenodo.modules.records.serializers.deposit_json_v1 = <zenodo.modules.records.serializers.json.ZenodoJSONSerializer object>

Zenodo Deposit JSON serializer version 1.0.0

zenodo.modules.records.serializers.deposit_json_v1_response(pid, record, code=200, headers=None, links_factory=None)

JSON record serializer for individual records.

JSON record serializer for search results.

zenodo.modules.records.serializers.json_v1 = <zenodo.modules.records.serializers.json.ZenodoJSONSerializer object>

Zenodo JSON serializer version 1.0.0

zenodo.modules.records.serializers.json_v1_response(pid, record, code=200, headers=None, links_factory=None)

JSON record serializer for individual records.

JSON record serializer for search results.

zenodo.modules.records.serializers.legacyjson_v1 = <zenodo.modules.records.serializers.legacyjson.LegacyJSONSerializer object>

Zenodo legacy deposit JSON serialzier version 1.0.0

zenodo.modules.records.serializers.legacyjson_v1_files_response(obj, status=None)

JSON files legacy serializer for files.

zenodo.modules.records.serializers.legacyjson_v1_response(pid, record, code=200, headers=None, links_factory=None)

JSON record legacy serializer for individual records.

JSON record legacy serializer for search results.

zenodo.modules.records.serializers.marcxml_v1 = <invenio_marc21.serializers.marcxml.MARCXMLSerializer object>

MARCXML serializer version 1.0.0

zenodo.modules.records.serializers.marcxml_v1_response(pid, record, code=200, headers=None, links_factory=None)

MARCXML record serializer for individual records.

MARCXML record serializer for search records.

zenodo.modules.records.serializers.oai_datacite = <invenio_records_rest.serializers.datacite.OAIDataCiteSerializer object>

OAI DataCite serializer

zenodo.modules.records.serializers.oaipmh_datacite_v31 = <bound method DataCite31Serializer.serialize_oaipmh of <invenio_records_rest.serializers.datacite.DataCite31Serializer object>>

OAI-PMH DataCite record serializer.

zenodo.modules.records.serializers.oaipmh_marc21_v1 = <bound method MARCXMLSerializer.serialize_oaipmh of <invenio_marc21.serializers.marcxml.MARCXMLSerializer object>>

OAI-PMH MARC21 record serializer.

zenodo.modules.records.serializers.oaipmh_oai_datacite = <bound method OAIDataCiteSerializer.serialize_oaipmh of <invenio_records_rest.serializers.datacite.OAIDataCiteSerializer object>>

OAI-PMH OAI DataCite record serializer.

zenodo.modules.records.serializers.oaipmh_oai_dc = <bound method DublinCoreSerializer.serialize_oaipmh of <invenio_records_rest.serializers.dc.DublinCoreSerializer object>>

OAI-PMH OAI Dublin Core record serializer.

Fetchers and minters

Persistent identifier minters.

zenodo.modules.records.minters.doi_generator(recid, prefix=None)[source]

Generate a DOI.

zenodo.modules.records.minters.is_local_doi(doi)[source]

Check if DOI is a locally managed DOI.

zenodo.modules.records.minters.zenodo_doi_minter(record_uuid, data)[source]

Mint DOI.

zenodo.modules.records.minters.zenodo_doi_updater(record_uuid, data)[source]

Update the DOI (only external DOIs).

zenodo.modules.records.minters.zenodo_record_minter(record_uuid, data)[source]

Mint record identifier (and DOI).

PID Fetchers.

zenodo.modules.records.fetchers.zenodo_record_fetcher(dummy_record_uuid, data)[source]

Fetch a record’s identifiers.

Indexing

Record modification prior to indexing.

zenodo.modules.records.indexer.indexer_receiver(sender, json=None, record=None, index=None, **dummy_kwargs)[source]

Connect to before_record_index signal to transform record for ES.

Permissions

Access controls for files on Zenodo.

class zenodo.modules.records.permissions.CommunityBucketPermission(action)[source]

Permission for files in community bucket.

Everyone are allowed to read. Admin can do everything.

can()[source]

Check permission.

class zenodo.modules.records.permissions.DepositFilesPermission(record, func)[source]

Permission for files in deposit records (read and update access).

Read and update access given to owners and administrators.

can()[source]

Determine access.

classmethod create(record, action)[source]

Record and instance.

update_actions = ['bucket-read', 'bucket-read-versions', 'bucket-update', 'bucket-listmultiparts', 'object-read', 'object-read-version', 'object-delete', 'object-delete-version', 'multipart-read', 'multipart-delete']
class zenodo.modules.records.permissions.RecordFilesPermission(record, func)[source]

Permission for files in published records (read only access).

Read access (list and download) granted to:

  1. Everyone if record is open access.
  2. Owners, token bearers and administrators if embargoed, restricted or closed access

Read version access granted to:

  1. Administrators only.
admin_actions = ['bucket-read', 'bucket-read-versions', 'object-read', 'object-read-version']
classmethod create(record, action)[source]

Create a record files permission.

read_actions = ['bucket-read', 'object-read']
zenodo.modules.records.permissions.deny(user, record)[source]

Deny access.

zenodo.modules.records.permissions.files_permission_factory(obj, action=None)[source]

Permission for files are always based on the type of bucket.

  1. Community bucket: Read access for everyone
  2. Record bucket: Read access only with open and restricted access.
  3. Deposit bucket: Read/update with restricted access.
  4. Any other bucket is restricted to admins only.
zenodo.modules.records.permissions.has_admin_permission(user, record)[source]

Check if user has admin access to record.

zenodo.modules.records.permissions.has_read_permission(user, record)[source]

Check if user has read access to the record.

zenodo.modules.records.permissions.has_update_permission(user, record)[source]

Check if user has update access to the record.

zenodo.modules.records.permissions.is_deposit(record)[source]

Determine if a record is a deposit record.

zenodo.modules.records.permissions.is_record(record)[source]

Determine if a record is a bibliographic record.

zenodo.modules.records.permissions.schema_prefix(schema)[source]

Get index prefix for a given schema.

Tasks

Celery background tasks.

Views

Blueprint for Zenodo-Records.

zenodo.modules.records.views.accessright_category(value, embargo_date=None, **kwargs)[source]

Get category for access right.

zenodo.modules.records.views.accessright_description(value, embargo_date=None)[source]

Get a description for access right.

zenodo.modules.records.views.accessright_get(value, embargo_date=None)[source]

Get access right.

Better than comparing record.access_right directly as access_right may have not yet been updated after the embargo_date has passed.

zenodo.modules.records.views.accessright_icon(value, embargo_date=None)[source]

Get icon for access right.

zenodo.modules.records.views.accessright_title(value, embargo_date=None)[source]

Get category for access right.

zenodo.modules.records.views.citation(record, pid, style=None, ln=None)[source]

Render citation for record according to style and language.

zenodo.modules.records.views.community_curation(record, user)[source]

Generate a list of pending and accepted communities with permissions.

Return a 2-tuple containing two lists, first for ‘pending’ and second for ‘accepted’ communities. Each item in both of the list is another 2-tuple of (Community, bool), describing community itself, and the permission (bool) to curate it.

zenodo.modules.records.views.has_access_to(user, record)[source]

Check whether the user has access to the record.

zenodo.modules.records.views.is_embargoed(embargo_date, accessright=None)[source]

Test if date is still embargoed (according to UTC date.

zenodo.modules.records.views.is_valid_accessright(value)[source]

Test if access right is valid.

zenodo.modules.records.views.local_doi(value)[source]

Test if a DOI is a local DOI.

zenodo.modules.records.views.make_query(values)[source]

Get category for access right.

zenodo.modules.records.views.objecttype(value)[source]

Get object type.

zenodo.modules.records.views.pid_url(identifier, scheme=None)[source]

Convert persistent identifier into a link.

zenodo.modules.records.views.record_communities()[source]

Context processor for community curation for given record.

zenodo.modules.records.views.records_ui_export(pid, record, template=None)[source]

Record serialization view.

Plug this method into your RECORDS_UI_ENDPOINTS configuration:

RECORDS_UI_ENDPOINTS = dict(
    recid=dict(
        # ...
        route='/records/<pid_value/files/<filename>',
        view_imp='zenodo.modules.records.views.records_ui_export',
    )
)
zenodo.modules.records.views.relation_title(relation)[source]

Map relation type to title.

zenodo.modules.records.views.select_preview_file(files)[source]

Get list of files and select one for preview.

Get logos for related links.

Marshmallow schemas

Record serialization.

class zenodo.modules.records.serializers.schemas.datacite.AlternateIdentifierSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Alternate identifiers schema.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.datacite.ContributorSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Contributor schema.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.datacite.CreatorSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Creator schema.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.datacite.DataCiteSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for records v1 in JSON.

get_contributors(obj)[source]

Get contributors.

get_dates(obj)[source]

Get dates.

get_descriptions(obj)[source]

.

Resource type.

get_rights(obj)[source]

Get rights.

get_subjects(obj)[source]

Get subjects.

get_type(obj)[source]

Resource type.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.datacite.DateSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Date schema.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.datacite.IdentifierSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Identifier schema.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.datacite.PersonSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Creator/contributor common schema.

get_nameidentifier(obj)[source]

Get name identifier.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.datacite.RelatedIdentifierSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Alternate identifiers schema.

get_type(obj)[source]

Get type.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.datacite.TitleSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Title schema.

opts = <marshmallow.schema.SchemaOpts object>

Record serialization.

class zenodo.modules.records.serializers.schemas.dc.DublinCoreV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for records v1 in JSON.

get_contributors(obj)[source]

Get contributors.

get_creators(obj)[source]

Get creators.

get_dates(obj)[source]

Get dates.

get_descriptions(obj)[source]

Get descriptions.

get_identifiers(obj)[source]

Get identifiers.

get_publishers(obj)[source]

Get publishers.

get_relations(obj)[source]

Get creators.

get_rights(obj)[source]

Get rights.

get_sources(obj)[source]

Get sources.

get_subjects(obj)[source]

Get subjects.

get_types(obj)[source]

Get types.

opts = <marshmallow.schema.SchemaOpts object>

Zenodo JSON schema.

class zenodo.modules.records.serializers.schemas.json.ActionSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for a actions.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.CommunitiesSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for communities.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.DepositSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Deposit schema.

Same as the Record schema except for some few extra additions.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.FilesSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Files metadata schema.

Get links.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.FunderSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for a funder.

get_funder_url(obj)[source]

Get grant url.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.GrantSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for a grant.

get_grant_url(obj)[source]

Get grant url.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.ImprintSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for imprint.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.JournalSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for a journal.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.LicenseSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for license.

Allows us to later introduce more properties for an owner.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.MeetingSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for a meeting.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.MetadataSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for a record.

dump_access_right_category(obj)[source]

Get access right category.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.OwnerSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for owners.

Allows us to later introduce more properties for an owner.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.PartOfSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for imprint.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.RecordSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for records v1 in JSON.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.ResourceTypeSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Resource type schema.

get_title(obj)[source]

Get title.

opts = <marshmallow.schema.SchemaOpts object>
validate_data(data)[source]

Validate resource type.

class zenodo.modules.records.serializers.schemas.json.StrictKeysSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Ensure only valid keys exists.

check_unknown_fields(data, original_data)[source]

Check for unknown keys.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.json.ThesisSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for thesis.

opts = <marshmallow.schema.SchemaOpts object>

Zenodo legacy JSON schema.

class zenodo.modules.records.serializers.schemas.legacyjson.BaseFileSchema(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Base schema for files.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.legacyjson.FileSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for files depositions.

dump_checksum(obj)[source]

Dump checksum.

Dump links.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.legacyjson.LegacyMetadataSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Legacy JSON metadata.

dump_communities(obj)[source]

Dump communities type.

dump_grants(obj)[source]

Get grants.

dump_image_type(obj)[source]

Get publication type.

dump_license(obj)[source]

Dump license.

dump_prereservedoi(obj)[source]

Dump pre-reserved DOI.

dump_publication_type(obj)[source]

Get publication type.

load_communities(data)[source]

Load communities type.

load_grants(data)[source]

Load grants.

load_license(data)[source]

Load license.

load_prereservedoi(obj)[source]

Load pre-reserved DOI.

The value is not important as we do not store it. Since the deposit and record id are now the same

merge_keys(data)[source]

Merge dot keys.

opts = <marshmallow.schema.SchemaOpts object>

Split related/alternate identifiers.

This ensures that we can just use the base schemas definitions of related/alternate identifies.

preload_license(data)[source]

Default license.

Split related/alternate identifiers.

This ensures that we can just use the base schemas definitions of related/alternate identifies for loading.

preload_resource_type(data)[source]

Prepare data for easier deserialization.

validate_communities(values)[source]

Validate communities.

validate_data(obj)[source]

Validate resource type.

class zenodo.modules.records.serializers.schemas.legacyjson.LegacyRecordSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Legacy JSON schema (used by deposit).

dump_owners(obj)[source]

Get owners.

dump_state(o)[source]

Get state of deposit.

opts = <marshmallow.schema.SchemaOpts object>
class zenodo.modules.records.serializers.schemas.legacyjson.ObjectVerisonSchemaV1(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for dumping objectversions.

dump_checksum(obj)[source]

Dump checksum.

Dump links.

opts = <marshmallow.schema.SchemaOpts object>

MARCXML translation index.

class zenodo.modules.records.serializers.schemas.marcxml.RecordSchemaMARC(extra=None, only=(), exclude=(), prefix='', strict=False, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Schema for records in MARC.

get_added_entry_meeting_name(o)[source]

Get added_entry_meeting_name.

get_added_entry_personal_name(o)[source]

Get added_entry_personal_name.

get_main_entry_personal_name(o)[source]

Get main_entry_personal_name.

opts = <marshmallow.schema.SchemaOpts object>
remove_empty_fields(data, many)[source]

Dump + Remove empty fields.

Marshmallow fields

Date string field.

class zenodo.modules.records.serializers.fields.datetime.DateString(default=<marshmallow.missing>, attribute=None, load_from=None, dump_to=None, error=None, validate=None, required=False, allow_none=None, load_only=False, dump_only=False, missing=<marshmallow.missing>, error_messages=None, **metadata)[source]

ISO8601-formatted date string.

DOI field.

class zenodo.modules.records.serializers.fields.doi.DOI(required_doi=None, allowed_dois=None, managed_prefixes=None, banned_prefixes=None, *args, **kwargs)[source]

Special DOI field.

default_error_messages = {'test_prefix': l'The prefix 10.5072 is invalid. The prefix is only used for testing purposes, and no DOIs with this prefix are attached to any meaningful content.', 'required_doi': l'The DOI cannot be changed.', 'invalid_doi': l"The provided DOI is invalid - it should look similar to '10.1234/foo.bar'.", 'banned_prefix': l'The prefix {prefix} is invalid.', 'managed_prefix': l'The prefix {prefix} is administrated locally.'}

DOI link field.

Persistent identifier field.

class zenodo.modules.records.serializers.fields.persistentid.PersistentId(scheme=None, normalize=True, *args, **kwargs)[source]

Special DOI field.

default_error_messages = {'invalid_scheme': l'Not a valid {scheme} identifier.', 'invalid_pid': l'Not a valid persistent identifier.'}

Trimmed string field.

class zenodo.modules.records.serializers.fields.trimmedstring.TrimmedString(*args, **kwargs)[source]

String field which strips whitespace the ends of the string.