Skip to main content

LOTR SDK

The LOTR SDK is a python SDK for retrieving book titles, movie titles, characters and quotes related to the Lord of the Rings Trilogy. It is built as a client to the one API, which provides data on the lord of the rings.

Installation

Use the package manager pip to install the requests library and the LOTR SDK.

pip install requests
pip install avisochek-sdk

You will also need an API key from the one API, which you can get by signing up here.

Usage

from LOTR.lotr import LOTR
from pprint import PrettyPrinter
pp = PrettyPrinter()

# initialize a client
lotr = LOTR(`<your API Key>`)

# Get a list of books.
list_of_books = lotr.get_book_info()
print("Lord Of The Rings Books:")
pp.pprint(list_of_books)

# Get a list of movies.
list_of_movies = lotr.get_movie_info()
print("Lord Of The Rings Movies:")
pp.pprint(list_of_movies)

# Get a list of characters.
list_of_characters = lotr.get_character_info()
print("10 Characters From Lord of the Rings:")
pp.pprint(list_of_characters[0:10])

movie_id = list_of_movies[6]["_id"]
movie_name = list_of_movies[6]["name"]
# Get a list of quotes from a particular movie
# (only works for lord of the rings trilogy for now)
quotes_from_movie = lotr.get_quotes_from_movie(movie_id)
print(f"10 Quotes From {movie_name}:")
pp.pprint(quotes_from_movie[0:10])

# Get a list of quotes from a particular character
quotes_from_frodo = lotr.get_quotes_from_character("5cd99d4bde30eff6ebccfc15")
print("10 Quotes From Frodo Baggins:")
pp.pprint(quotes_from_frodo[0:10])

book_id = list_of_books[0]["_id"]
book_name = list_of_books[0]["name"]
# Get a list of chapters from the first book
book_chapters = lotr.get_book_chapters(book_id)
print(f"Chapters From {book_name}:")
pp.pprint(book_chapters)

License

MIT

Metadata

Release files for avisochek-sdk 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for avisochek-sdk 0.0.2
File Size Uploaded
avisochek-sdk-0.0.2.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for avisochek-sdk 0.0.2
File Interpreter ABI Platform
avisochek_sdk-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / avisochek-sdk-0.0.2.tar.gz

Download URL avisochek-sdk-0.0.2.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5e128cc765d90a4e04d8a2647358a99793215b7a0b64fa02d0da2edcd39683d8
BLAKE2b-256 checksum
How to use checksums
edd86b3f5ed12d465cc4ec48c167efa9f85696695c85b0dc6500fcfebcfb3d25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / avisochek_sdk-0.0.2-py3-none-any.whl

Download URL avisochek_sdk-0.0.2-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e453faa7286d79ca172e38a177b70fb7f4e4fc58c08a3cb1d8b0ef81cfd3a62
BLAKE2b-256 checksum
How to use checksums
c063924bc41889a9c28a8805a1ee8d0b3193118696fa35131e31bda0d02b1ca9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page