Command Line Tool to dig into movies at OMDBAPI
Project description
cinemator
Command Line Tool for digging up all sort of medias
Assumptions
-
Assumed that If someone knows the imdb id, they are looking for a specific medias details therefore that feature is not search but in get details.
-
OMDB API does not have extended documentation for python libraries (omdb and omdbapi) therefore used requests instead of using the dedicated libraries. Please see for further background; linkedin blog
-
Rotten Tomatoes details are no longer available at OMDB. I have included the feature to enable the information with a note that a future implementation can be done to retrieve it from fandango directly. I have requested api keys for this. Please see for further background; omdb rating changes, where to get tomatoes info
-
Asummed that the API key will be passed from a local file for the security concerns. This would be a centralised secret management parameter if the service was deployed to production.
Resources and Design Decisions
- Used cookie cutter for project structure. cookiecutter
- Used a tool using the cookie cutter to cut cli projects. cli cutter
- Used requests for restful events as mentioned at Assumptions
- The cli cookie cutter comes with "click". I would use click for a command line implemenetation in any case as it is most convenient cli implementation tool.Providing extensive options and configurations for arguments as well.
- Mainly used unittest.mock for tests, avoided calling functions for real.
Setup And Configuration
API KEY
In order to access to omdb api, you need to retrieve an api key. Please find the request page here.
- Update
config.py
with path to the api key file
Initialize virtual machine and run the code
python3 -m venv venv
source . venv/bin/activate
- make sure that you are at /cinemator/
make setup
ln -s path_to/cinemator/cinemat/__main__.py cinemator
CINEMATOR Commands
cinemator details
gets the extended details for the sepcific media,cinemator imdb
gets the info for the specific imdb id ,cinemator info
gives information about the tool and the background,cinemator search
searches medias by keyword without specification,cinemator type
serches medias by type and title,cinemator year
searches medias by year and title
MAKE Commands
make clean
to clean unnecessary files before commitsmake lint
to check linting with flake8make lint-fix
to fix code with blackmake setup
to build and install the application
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file cinemator-0.1.4.tar.gz
.
File metadata
- Download URL: cinemator-0.1.4.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a3df734bd7c9341ebc93783286d3f29950f0bb462b35cb818f6a4773503263a |
|
MD5 | f73feb17bc0698c6bf47eab48e3363d2 |
|
BLAKE2b-256 | b00d410f5387e7fbe58dc5d2c6cf972e75227cfdf165aaca7752ab1f172b1f77 |
File details
Details for the file cinemator-0.1.4-py2.py3-none-any.whl
.
File metadata
- Download URL: cinemator-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d01ce5d270020f7c50124ca95aa72a68bc6fd67bc698dc9b77b6214235ac06a5 |
|
MD5 | cab99af32eeeb9aade9d6c5d8a04a90c |
|
BLAKE2b-256 | 5ab8481a6be44dd6926f75c0ad69e8de9e85c586f414ca7f288e7782c1c633da |