inspirehep.modules.records.serializers.schemas package

Subpackages

Submodules

inspirehep.modules.records.serializers.schemas.base module

Schema for parsing literature records.

class inspirehep.modules.records.serializers.schemas.base.JSONSchemaUIV1(extra=None, only=None, exclude=(), prefix=u'', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]

Bases: marshmallow.schema.Schema

JSON schema.

opts = <marshmallow.schema.SchemaOpts object>
class inspirehep.modules.records.serializers.schemas.base.PybtexSchema[source]

Bases: object

load(record)[source]

Deserialize an INSPIRE record into a Pybtex Entity.

Takes an INSPIRE record and converts it to a pybtex.database.Entity. Special treatment is applied to authors, which are expressed using pybtex.database.Person if they are real persons, and passed like other fields if they are corporate authors. Human-authors supersede corporate authors.

Parameters:record (dict) – literature record from API
Returns:Pybtex entity
Return type:pybtex.database.Entity

Module contents