project_gutenberg.gutenberg_models ================================== .. py:module:: project_gutenberg.gutenberg_models Attributes ---------- .. autoapisummary:: project_gutenberg.gutenberg_models.here Classes ------- .. autoapisummary:: project_gutenberg.gutenberg_models.GutenbergAuthor project_gutenberg.gutenberg_models.GutenbergBook project_gutenberg.gutenberg_models.GutenbergSearchResponse Module Contents --------------- .. py:class:: GutenbergAuthor(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` An author record as returned by the Gutendex API. .. py:attribute:: name :type: str .. py:attribute:: birth_year :type: int | None :value: None .. py:attribute:: death_year :type: int | None :value: None .. py:class:: GutenbergBook(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` A single book record as returned by the Gutendex API. Endpoint: GET https://gutendex.com/books/?search= .. py:attribute:: id :type: int .. py:attribute:: title :type: str .. py:attribute:: authors :type: list[GutenbergAuthor] :value: [] .. py:attribute:: translators :type: list[GutenbergAuthor] :value: [] .. py:attribute:: subjects :type: list[str] :value: [] .. py:attribute:: bookshelves :type: list[str] :value: [] .. py:attribute:: languages :type: list[str] :value: [] .. py:attribute:: copyright :type: bool | None :value: None .. py:attribute:: media_type :type: str :value: '' .. py:attribute:: formats :type: dict[str, str] .. py:attribute:: download_count :type: int :value: 0 .. py:property:: source_url :type: str Return the canonical Project Gutenberg URL for this book. .. py:property:: author_names :type: list[str] Return author names in natural order (first last). Gutenberg stores names as "Last, First"; split on the first comma and reassemble as "First Last". .. py:class:: GutenbergSearchResponse(/, **data: Any) Bases: :py:obj:`pydantic.BaseModel` Paginated search response from the Gutendex API. Endpoint: GET https://gutendex.com/books/?search=&page= .. py:attribute:: count :type: int .. py:attribute:: next :type: str | None :value: None .. py:attribute:: previous :type: str | None :value: None .. py:attribute:: results :type: list[GutenbergBook] :value: [] .. py:data:: here