This is a project for retrieving information from an Ombi instance using their API.
Run the following to install:
pip install pyombi
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"
)
ombi.authenticate()
try:
ombi.test_connection()
except pyombi.OmbiError as e:
print(e)
return
movies = ombi.movie_requests
tv = ombi.tv_requests
music = ombi.music_requests
total = ombi.total_requests
movie_search = ombi.search_movie("Movie Name")
tv_search = ombi.search_tv("TV show name")
music_search = ombi.search_music_album("Album name")
ombi.request_movie("theMovieDbId")
ombi.request_tv("theTvDbId", request_latest=True)
ombi.request_music("foreignAlbumId")
This project is licensed under the MIT License - see the LICENSE.txt file for details.