Skip to main content

A micro lord of the rings sdk

Project description

Lord Of The Rings SDK

Description: An SDK that makes it easy for developers to consume information about the Lord of The Rings trilogy.

SDK builds on an existing Lord of The Rings API

Tech Stack

Built using Python 3.10.5 (see .python-version file). External libraries are kept as minimal as possible (see requirements.in file)

Installation

pip install lord-aubrey-of-the-rings

Run

Register and login here to get your access token.

Import the class LordOfTheRings and call the available methods, passing params where necessary. Example:

from lord_of_the_rings.endpoints import LordOfTheRings

client = LordOfTheRings(access_token='your_access_token')

client.get_books()
client.get_movies('5cd95395de30eff6ebccde5b')
client.get_characters('5cd99d4bde30eff6ebccfe2e', 'quote')

There are also the options of

Pagination:

client.get_characters(limit=2)
client.get_characters(page=3)
client.get_characters(offset=11)

Sorting:

client.get_books(sort='name:asc')
client.get_quotes(sort='dialog:desc')

and Filtering:

client.get_characters(name='Gandalf')
client.get_characters(race='Hobbit,Human')

Consult the API docs for more information

Exposed methods:

METHOD          : PARAMETER(S)
get_books       : identifier (optional), 'chapter' (optional, requires identifier)
get_movies      : identifier (optional), 'quote' (optional, requires identifier)
get_characters  : identifier (optional), 'quote' (optional, requires identifier)
get_quotes      : identifier (optional)
get_chapters    : identifier (optional)

Install (to run SDK locally)

Clone github repo and run the following code. It creates a fresh virtual environment (called .venv) and installs requirements

make setup

Install pip requirements / Sync requirements.in with requirements.txt

make pip_sync

Run tests

make runtest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lord-aubrey-of-the-rings-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

lord_aubrey_of_the_rings-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file lord-aubrey-of-the-rings-0.1.0.tar.gz.

File metadata

File hashes

Hashes for lord-aubrey-of-the-rings-0.1.0.tar.gz
Algorithm Hash digest
SHA256 523fcceaf5e663a0a465151ee2be54acbaa81b2b7cc6486d13d1eb2dbde1a931
MD5 229554f8c951f35162cb64c861637b99
BLAKE2b-256 69f528f16e0286af38f035eb5373f98a095f1715b1d2c45bdeda681eaec978ac

See more details on using hashes here.

File details

Details for the file lord_aubrey_of_the_rings-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lord_aubrey_of_the_rings-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3cf690ad908f94b6ffa54a4dbcb3df9d3bd5c2372894cceaedea7983cbe10b8
MD5 adb0806840ac65b36304f6ae4400f1e7
BLAKE2b-256 e96de0e1ea22899d87174d0ed40fcc4ea22de5405dafe39474ebf32af62f0919

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page