web_programming.search_books_by_isbn ==================================== .. py:module:: web_programming.search_books_by_isbn .. autoapi-nested-parse:: Get book and author data from https://openlibrary.org ISBN: https://en.wikipedia.org/wiki/International_Standard_Book_Number Attributes ---------- .. autoapisummary:: web_programming.search_books_by_isbn.isbn Functions --------- .. autoapisummary:: web_programming.search_books_by_isbn.get_openlibrary_data web_programming.search_books_by_isbn.summarize_book Module Contents --------------- .. py:function:: get_openlibrary_data(olid: str = 'isbn/0140328726') -> dict Given an 'isbn/0140328726', return book data from Open Library as a Python dict. Given an '/authors/OL34184A', return authors data as a Python dict. This code must work for olids with or without a leading slash ('/'). # Comment out doctests if they take too long or have results that may change # >>> get_openlibrary_data(olid='isbn/0140328726') # doctest: +ELLIPSIS {'publishers': ['Puffin'], 'number_of_pages': 96, 'isbn_10': ['0140328726'], ... # >>> get_openlibrary_data(olid='/authors/OL7353617A') # doctest: +ELLIPSIS {'name': 'Adrian Brisku', 'created': {'type': '/type/datetime', ... .. py:function:: summarize_book(ol_book_data: dict) -> dict Given Open Library book data, return a summary as a Python dict. .. py:data:: isbn