Code Monkey home page Code Monkey logo

pyombi's Introduction

PyPI version Downloads

pyombi

This is a project for retrieving information from an Ombi instance using their API.

Installation

Run the following to install:

pip install pyombi

Usage

Creating an object of your Ombi instance

Note: You have to supply either a password or an api_key to successfully authenticate. The api_key will take precedence if both are supplied.

import pyombi

ombi = pyombi.Ombi(
    ssl=True,
    host="192.168.1.120",
    port="5000",
    urlbase="ombi/",
    username="MyUsername",
    password="MyPassword",
    api_key="pixf64thuh2m7kbwwgkqp52yznbj4oyo"
)

Authenticate

ombi.authenticate()

Testing connection to Ombi

try:
    ombi.test_connection()
except pyombi.OmbiError as e:
    print(e)
    return

Retrieving data

movies = ombi.movie_requests
tv = ombi.tv_requests
music = ombi.music_requests

total = ombi.total_requests

Searching

movie_search = ombi.search_movie("Movie Name")  
tv_search = ombi.search_tv("TV show name")
music_search = ombi.search_music_album("Album name")

Requesting

ombi.request_movie("theMovieDbId")
ombi.request_tv("theTvDbId", request_latest=True)
ombi.request_music("foreignAlbumId")

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

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.