structures
This module contains all structures used in AMQP communication.
-
class harvester.structures.Author(name, URL=None)[source]
Bases: object
Author name representation.
-
name str
String containing author’s name.
-
URL str
URL to author’s profile.
-
to_namedtuple()[source]
Convert class to namedtuple.
Note
This method is neccessary for AMQP communication.
Returns: | namedtuple –
Representation of the class as simple structure. |
-
class harvester.structures.Optionals[source]
Bases: object
Structure for holding optional informations about given publication.
-
sub_title str, default None
Subtitle of the book.
-
format str, default None
Format of the book - A5 for example.
-
pub_date str, default None
Date when the book was published.
-
pub_place str, default None
Name of the city, where the book was
published.
-
ISBN str, default None
ISBN of the book.
-
description str, default None
Description of the book, which may
contain HTML tags and elements!
-
pages str, default None
Number of pages.
-
EAN str, default None
EAN of the book.
-
language str, default None
Language of the book.
-
edition str, default None
Edition in which the book was published.
-
URL str, default None
URL to the eshop with the book.
-
binding str, default None
Binding of the book (brožovaná for
example).
-
is_ebook bool, default False
If True, metadata belongs to ebook.
-
to_namedtuple()[source]
Convert class to namedtuple.
Note
This method is neccessary for AMQP communication.
Returns: | namedtuple –
Representation of the class as simple structure. |
-
class harvester.structures.Publication(title, authors, price, publisher)[source]
Bases: object
This class contains only required minimal subset of informations about
publication.
-
title str
Title of the book.
-
price str
Price as string with currency.
-
publisher str
Publishers name as string.
-
authors list
List of Author objects. May be blank.
-
optionals obj
Reference to Optionals object with optional
informations.
-
to_namedtuple()[source]
Convert class and all subclasses (Author, Optionals)
to namedtuple.
Note
This method is neccessary for AMQP communication.
Returns: | namedtuple –
Representation of the class as simple structure. |
-
class harvester.structures.Publications[source]
Bases: harvester.structures.Publication
AMQP communication structured used to hold the transfered informations.
-
publications list
List of Publication namedtuples.