Coder Social home page Coder Social logo

omdb.wrapper's Introduction

Omdb.wrapper

Build status

Python wrapper class for Omdb movie database API

Features

  • Builds configured via Travis CI/CD

  • Git hooks configured with Pre-Commit

  • Streamlined API calls to organise data for Movie searches

  • Batches Movie searches into search history

  • Provides Movie search history sorted by Metacritic rating, alphabetically by title, or by year

  • Provides Actor, Director, Genre, Country, Language, and Production Studio searches in search history

  • Provides typechecking and error handling for user inputs

  • Help documentation implemented for information on valid types and inputs on functions

Prerequisites

Ensure you are running Python 3.7.1

$ python3 --version # returns 'Python 3.7.1'

Use pipenv to install all required pip3 packages from Pipfile and create virtual environment

$ pipenv install

Use pipenv to access functions

$ pipenv shell

Set up git hooks for pre-commit checks notated in .pre-commit-config.yaml

$ pre-commit install

Usage

Run the main functions

from omdb_wrapper import omdb_wrapper

api_key = 'xxxxxxxx'
# instantialises jeopardy_parser object
test_wrapper = omdb_wrapper(api_key)

# creates dictionary of results from omdb api request from a movie title and appends to search history
test_wrapper.build_dict_from_api(test_wrapper.create_movie_search_url('title', 'Toy Story'))

# sort search history dictionary by year and return list
test_wrapper.sort_movies('year', 'new_to_old')

# return list of movie titles from search history dictionary with provided search type and query
test_wrapper.search_movies('actor', 'chris pratt')

Run the unit tests

$ pytest -v

Contact Info

self.name = 'Isaac Sheikh'
self.email = '[email protected]'
self.phone = '571-315-1881'

Potential Next Steps

  • Add additional tests to allow committing against pre-commit hooks if requirements change
  • Update pre-commit yaml file to account for future improvements

omdb.wrapper's People

Watchers

James Cloos avatar Rachel Sheikh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.