Skip to content

Repository files navigation

sonarr-py

Sonarr API docs - The v3 API docs apply to both v3 and v4 versions of Sonarr. Some functionality may only be available in v4 of the Sonarr application.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: v4.0.17.2952
  • Package version: 1.1.1
  • Generator version: 7.24.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.10+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/devopsarr/sonarr-py.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/devopsarr/sonarr-py.git)

Then import the package:

importsonarr

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

importsonarr

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

importsonarrfromsonarr.restimportApiExceptionfrompprintimportpprint# Defining the host is optional and defaults to http://localhost:8989# See configuration.py for a list of all supported configuration parameters.configuration=sonarr.Configuration(
host="http://localhost:8989"
)
# The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure API key authorization: apikeyconfiguration.api_key['apikey'] =os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['apikey'] = 'Bearer'# Configure API key authorization: X-Api-Keyconfiguration.api_key['X-Api-Key'] =os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['X-Api-Key'] = 'Bearer'# Enter a context with an instance of the API clientwithsonarr.ApiClient(configuration) asapi_client:
# Create an instance of the API classapi_instance=sonarr.ApiInfoApi(api_client)
try:
api_instance.get_api()
exceptApiExceptionase:
print("Exception when calling ApiInfoApi->get_api: %s\n"%e)

Documentation for API Endpoints

All URIs are relative to http://localhost:8989

ClassMethodHTTP requestDescription
ApiInfoApiget_apiGET /api
AuthenticationApicreate_loginPOST /login
AuthenticationApiget_logoutGET /logout
AutoTaggingApicreate_auto_taggingPOST /api/v3/autotagging
AutoTaggingApidelete_auto_taggingDELETE /api/v3/autotagging/{id}
AutoTaggingApiget_auto_tagging_by_idGET /api/v3/autotagging/{id}
AutoTaggingApilist_auto_taggingGET /api/v3/autotagging
AutoTaggingApilist_auto_tagging_schemaGET /api/v3/autotagging/schema
AutoTaggingApiupdate_auto_taggingPUT /api/v3/autotagging/{id}
BackupApicreate_system_backup_restore_by_idPOST /api/v3/system/backup/restore/{id}
BackupApicreate_system_backup_restore_uploadPOST /api/v3/system/backup/restore/upload
BackupApidelete_system_backupDELETE /api/v3/system/backup/{id}
BackupApilist_system_backupGET /api/v3/system/backup
BlocklistApidelete_blocklistDELETE /api/v3/blocklist/{id}
BlocklistApidelete_blocklist_bulkDELETE /api/v3/blocklist/bulk
BlocklistApiget_blocklistGET /api/v3/blocklist
CalendarApiget_calendar_by_idGET /api/v3/calendar/{id}
CalendarApilist_calendarGET /api/v3/calendar
CalendarFeedApiget_feed_v3_calendar_sonarr_icsGET /feed/v3/calendar/sonarr.ics
CommandApicreate_commandPOST /api/v3/command
CommandApidelete_commandDELETE /api/v3/command/{id}
CommandApiget_command_by_idGET /api/v3/command/{id}
CommandApilist_commandGET /api/v3/command
CustomFilterApicreate_custom_filterPOST /api/v3/customfilter
CustomFilterApidelete_custom_filterDELETE /api/v3/customfilter/{id}
CustomFilterApiget_custom_filter_by_idGET /api/v3/customfilter/{id}
CustomFilterApilist_custom_filterGET /api/v3/customfilter
CustomFilterApiupdate_custom_filterPUT /api/v3/customfilter/{id}
CustomFormatApicreate_custom_formatPOST /api/v3/customformat
CustomFormatApidelete_custom_formatDELETE /api/v3/customformat/{id}
CustomFormatApidelete_custom_format_bulkDELETE /api/v3/customformat/bulk
CustomFormatApiget_custom_format_by_idGET /api/v3/customformat/{id}
CustomFormatApilist_custom_formatGET /api/v3/customformat
CustomFormatApilist_custom_format_schemaGET /api/v3/customformat/schema
CustomFormatApiput_custom_format_bulkPUT /api/v3/customformat/bulk
CustomFormatApiupdate_custom_formatPUT /api/v3/customformat/{id}
CutoffApiget_wanted_cutoffGET /api/v3/wanted/cutoff
CutoffApiget_wanted_cutoff_by_idGET /api/v3/wanted/cutoff/{id}
DelayProfileApicreate_delay_profilePOST /api/v3/delayprofile
DelayProfileApidelete_delay_profileDELETE /api/v3/delayprofile/{id}
DelayProfileApiget_delay_profile_by_idGET /api/v3/delayprofile/{id}
DelayProfileApilist_delay_profileGET /api/v3/delayprofile
DelayProfileApiupdate_delay_profilePUT /api/v3/delayprofile/{id}
DelayProfileApiupdate_delay_profile_reorderPUT /api/v3/delayprofile/reorder/{id}
DiskSpaceApilist_disk_spaceGET /api/v3/diskspace
DownloadClientApicreate_download_clientPOST /api/v3/downloadclient
DownloadClientApicreate_download_client_action_by_namePOST /api/v3/downloadclient/action/{name}
DownloadClientApidelete_download_clientDELETE /api/v3/downloadclient/{id}
DownloadClientApidelete_download_client_bulkDELETE /api/v3/downloadclient/bulk
DownloadClientApiget_download_client_by_idGET /api/v3/downloadclient/{id}
DownloadClientApilist_download_clientGET /api/v3/downloadclient
DownloadClientApilist_download_client_schemaGET /api/v3/downloadclient/schema
DownloadClientApiput_download_client_bulkPUT /api/v3/downloadclient/bulk
DownloadClientApitest_download_clientPOST /api/v3/downloadclient/test
DownloadClientApitestall_download_clientPOST /api/v3/downloadclient/testall
DownloadClientApiupdate_download_clientPUT /api/v3/downloadclient/{id}
DownloadClientConfigApiget_download_client_configGET /api/v3/config/downloadclient
DownloadClientConfigApiget_download_client_config_by_idGET /api/v3/config/downloadclient/{id}
DownloadClientConfigApiupdate_download_client_configPUT /api/v3/config/downloadclient/{id}
EpisodeApiget_episode_by_idGET /api/v3/episode/{id}
EpisodeApilist_episodeGET /api/v3/episode
EpisodeApiput_episode_monitorPUT /api/v3/episode/monitor
EpisodeApiupdate_episodePUT /api/v3/episode/{id}
EpisodeFileApidelete_episode_fileDELETE /api/v3/episodefile/{id}
EpisodeFileApidelete_episode_file_bulkDELETE /api/v3/episodefile/bulk
EpisodeFileApiget_episode_file_by_idGET /api/v3/episodefile/{id}
EpisodeFileApilist_episode_fileGET /api/v3/episodefile
EpisodeFileApiput_episode_file_bulkPUT /api/v3/episodefile/bulk
EpisodeFileApiput_episode_file_editorPUT /api/v3/episodefile/editor
EpisodeFileApiupdate_episode_filePUT /api/v3/episodefile/{id}
FileSystemApiget_file_systemGET /api/v3/filesystem
FileSystemApiget_file_system_mediafilesGET /api/v3/filesystem/mediafiles
FileSystemApiget_file_system_typeGET /api/v3/filesystem/type
HealthApilist_healthGET /api/v3/health
HistoryApicreate_history_failed_by_idPOST /api/v3/history/failed/{id}
HistoryApiget_historyGET /api/v3/history
HistoryApilist_history_seriesGET /api/v3/history/series
HistoryApilist_history_sinceGET /api/v3/history/since
HostConfigApiget_host_configGET /api/v3/config/host
HostConfigApiget_host_config_by_idGET /api/v3/config/host/{id}
HostConfigApiupdate_host_configPUT /api/v3/config/host/{id}
ImportListApicreate_import_listPOST /api/v3/importlist
ImportListApicreate_import_list_action_by_namePOST /api/v3/importlist/action/{name}
ImportListApidelete_import_listDELETE /api/v3/importlist/{id}
ImportListApidelete_import_list_bulkDELETE /api/v3/importlist/bulk
ImportListApiget_import_list_by_idGET /api/v3/importlist/{id}
ImportListApilist_import_listGET /api/v3/importlist
ImportListApilist_import_list_schemaGET /api/v3/importlist/schema
ImportListApiput_import_list_bulkPUT /api/v3/importlist/bulk
ImportListApitest_import_listPOST /api/v3/importlist/test
ImportListApitestall_import_listPOST /api/v3/importlist/testall
ImportListApiupdate_import_listPUT /api/v3/importlist/{id}
ImportListConfigApiget_import_list_configGET /api/v3/config/importlist
ImportListConfigApiget_import_list_config_by_idGET /api/v3/config/importlist/{id}
ImportListConfigApiupdate_import_list_configPUT /api/v3/config/importlist/{id}
ImportListExclusionApicreate_import_list_exclusionPOST /api/v3/importlistexclusion
ImportListExclusionApidelete_import_list_exclusionDELETE /api/v3/importlistexclusion/{id}
ImportListExclusionApidelete_import_list_exclusion_bulkDELETE /api/v3/importlistexclusion/bulk
ImportListExclusionApiget_import_list_exclusion_by_idGET /api/v3/importlistexclusion/{id}
ImportListExclusionApiget_import_list_exclusion_pagedGET /api/v3/importlistexclusion/paged
ImportListExclusionApilist_import_list_exclusionGET /api/v3/importlistexclusion
ImportListExclusionApiupdate_import_list_exclusionPUT /api/v3/importlistexclusion/{id}
IndexerApicreate_indexerPOST /api/v3/indexer
IndexerApicreate_indexer_action_by_namePOST /api/v3/indexer/action/{name}
IndexerApidelete_indexerDELETE /api/v3/indexer/{id}
IndexerApidelete_indexer_bulkDELETE /api/v3/indexer/bulk
IndexerApiget_indexer_by_idGET /api/v3/indexer/{id}
IndexerApilist_indexerGET /api/v3/indexer
IndexerApilist_indexer_schemaGET /api/v3/indexer/schema
IndexerApiput_indexer_bulkPUT /api/v3/indexer/bulk
IndexerApitest_indexerPOST /api/v3/indexer/test
IndexerApitestall_indexerPOST /api/v3/indexer/testall
IndexerApiupdate_indexerPUT /api/v3/indexer/{id}
IndexerConfigApiget_indexer_configGET /api/v3/config/indexer
IndexerConfigApiget_indexer_config_by_idGET /api/v3/config/indexer/{id}
IndexerConfigApiupdate_indexer_configPUT /api/v3/config/indexer/{id}
IndexerFlagApilist_indexer_flagGET /api/v3/indexerflag
LanguageApiget_language_by_idGET /api/v3/language/{id}
LanguageApilist_languageGET /api/v3/language
LanguageProfileApicreate_language_profilePOST /api/v3/languageprofile
LanguageProfileApidelete_language_profileDELETE /api/v3/languageprofile/{id}
LanguageProfileApiget_language_profile_by_idGET /api/v3/languageprofile/{id}
LanguageProfileApilist_language_profileGET /api/v3/languageprofile
LanguageProfileApiupdate_language_profilePUT /api/v3/languageprofile/{id}
LanguageProfileSchemaApiget_languageprofile_schemaGET /api/v3/languageprofile/schema
LocalizationApiget_localizationGET /api/v3/localization
LocalizationApiget_localization_by_idGET /api/v3/localization/{id}
LocalizationApiget_localization_languageGET /api/v3/localization/language
LogApiget_logGET /api/v3/log
LogFileApiget_log_file_by_filenameGET /api/v3/log/file/{filename}
LogFileApilist_log_fileGET /api/v3/log/file
ManualImportApicreate_manual_importPOST /api/v3/manualimport
ManualImportApilist_manual_importGET /api/v3/manualimport
MediaCoverApiget_media_cover_by_filenameGET /api/v3/mediacover/{seriesId}/{filename}
MediaManagementConfigApiget_media_management_configGET /api/v3/config/mediamanagement
MediaManagementConfigApiget_media_management_config_by_idGET /api/v3/config/mediamanagement/{id}
MediaManagementConfigApiupdate_media_management_configPUT /api/v3/config/mediamanagement/{id}
MetadataApicreate_metadataPOST /api/v3/metadata
MetadataApicreate_metadata_action_by_namePOST /api/v3/metadata/action/{name}
MetadataApidelete_metadataDELETE /api/v3/metadata/{id}
MetadataApiget_metadata_by_idGET /api/v3/metadata/{id}
MetadataApilist_metadataGET /api/v3/metadata
MetadataApilist_metadata_schemaGET /api/v3/metadata/schema
MetadataApitest_metadataPOST /api/v3/metadata/test
MetadataApitestall_metadataPOST /api/v3/metadata/testall
MetadataApiupdate_metadataPUT /api/v3/metadata/{id}
MissingApiget_wanted_missingGET /api/v3/wanted/missing
MissingApiget_wanted_missing_by_idGET /api/v3/wanted/missing/{id}
NamingConfigApiget_naming_configGET /api/v3/config/naming
NamingConfigApiget_naming_config_by_idGET /api/v3/config/naming/{id}
NamingConfigApiget_naming_config_examplesGET /api/v3/config/naming/examples
NamingConfigApiupdate_naming_configPUT /api/v3/config/naming/{id}
NotificationApicreate_notificationPOST /api/v3/notification
NotificationApicreate_notification_action_by_namePOST /api/v3/notification/action/{name}
NotificationApidelete_notificationDELETE /api/v3/notification/{id}
NotificationApiget_notification_by_idGET /api/v3/notification/{id}
NotificationApilist_notificationGET /api/v3/notification
NotificationApilist_notification_schemaGET /api/v3/notification/schema
NotificationApitest_notificationPOST /api/v3/notification/test
NotificationApitestall_notificationPOST /api/v3/notification/testall
NotificationApiupdate_notificationPUT /api/v3/notification/{id}
ParseApiget_parseGET /api/v3/parse
PingApiget_pingGET /ping
PingApihead_pingHEAD /ping
QualityDefinitionApiget_quality_definition_by_idGET /api/v3/qualitydefinition/{id}
QualityDefinitionApiget_quality_definition_limitsGET /api/v3/qualitydefinition/limits
QualityDefinitionApilist_quality_definitionGET /api/v3/qualitydefinition
QualityDefinitionApiput_quality_definition_updatePUT /api/v3/qualitydefinition/update
QualityDefinitionApiupdate_quality_definitionPUT /api/v3/qualitydefinition/{id}
QualityProfileApicreate_quality_profilePOST /api/v3/qualityprofile
QualityProfileApidelete_quality_profileDELETE /api/v3/qualityprofile/{id}
QualityProfileApiget_quality_profile_by_idGET /api/v3/qualityprofile/{id}
QualityProfileApilist_quality_profileGET /api/v3/qualityprofile
QualityProfileApiupdate_quality_profilePUT /api/v3/qualityprofile/{id}
QualityProfileSchemaApiget_qualityprofile_schemaGET /api/v3/qualityprofile/schema
QueueApidelete_queueDELETE /api/v3/queue/{id}
QueueApidelete_queue_bulkDELETE /api/v3/queue/bulk
QueueApiget_queueGET /api/v3/queue
QueueActionApicreate_queue_grab_bulkPOST /api/v3/queue/grab/bulk
QueueActionApicreate_queue_grab_by_idPOST /api/v3/queue/grab/{id}
QueueDetailsApilist_queue_detailsGET /api/v3/queue/details
QueueStatusApiget_queue_statusGET /api/v3/queue/status
ReleaseApicreate_releasePOST /api/v3/release
ReleaseApilist_releaseGET /api/v3/release
ReleaseProfileApicreate_release_profilePOST /api/v3/releaseprofile
ReleaseProfileApidelete_release_profileDELETE /api/v3/releaseprofile/{id}
ReleaseProfileApiget_release_profile_by_idGET /api/v3/releaseprofile/{id}
ReleaseProfileApilist_release_profileGET /api/v3/releaseprofile
ReleaseProfileApiupdate_release_profilePUT /api/v3/releaseprofile/{id}
ReleasePushApicreate_release_pushPOST /api/v3/release/push
RemotePathMappingApicreate_remote_path_mappingPOST /api/v3/remotepathmapping
RemotePathMappingApidelete_remote_path_mappingDELETE /api/v3/remotepathmapping/{id}
RemotePathMappingApiget_remote_path_mapping_by_idGET /api/v3/remotepathmapping/{id}
RemotePathMappingApilist_remote_path_mappingGET /api/v3/remotepathmapping
RemotePathMappingApiupdate_remote_path_mappingPUT /api/v3/remotepathmapping/{id}
RenameEpisodeApilist_renameGET /api/v3/rename
RootFolderApicreate_root_folderPOST /api/v3/rootfolder
RootFolderApidelete_root_folderDELETE /api/v3/rootfolder/{id}
RootFolderApiget_root_folder_by_idGET /api/v3/rootfolder/{id}
RootFolderApilist_root_folderGET /api/v3/rootfolder
SeasonPassApicreate_season_passPOST /api/v3/seasonpass
SeriesApicreate_seriesPOST /api/v3/series
SeriesApidelete_seriesDELETE /api/v3/series/{id}
SeriesApiget_series_by_idGET /api/v3/series/{id}
SeriesApilist_seriesGET /api/v3/series
SeriesApiupdate_seriesPUT /api/v3/series/{id}
SeriesEditorApidelete_series_editorDELETE /api/v3/series/editor
SeriesEditorApiput_series_editorPUT /api/v3/series/editor
SeriesFolderApiget_series_folderGET /api/v3/series/{id}/folder
SeriesImportApicreate_series_importPOST /api/v3/series/import
SeriesLookupApilist_series_lookupGET /api/v3/series/lookup
StaticResourceApiget_by_pathGET /{path}
StaticResourceApiget_content_by_pathGET /content/{path}
StaticResourceApiget_loginGET /login
SystemApicreate_system_restartPOST /api/v3/system/restart
SystemApicreate_system_shutdownPOST /api/v3/system/shutdown
SystemApiget_system_routesGET /api/v3/system/routes
SystemApiget_system_routes_duplicateGET /api/v3/system/routes/duplicate
SystemApiget_system_statusGET /api/v3/system/status
TagApicreate_tagPOST /api/v3/tag
TagApidelete_tagDELETE /api/v3/tag/{id}
TagApiget_tag_by_idGET /api/v3/tag/{id}
TagApilist_tagGET /api/v3/tag
TagApiupdate_tagPUT /api/v3/tag/{id}
TagDetailsApiget_tag_detail_by_idGET /api/v3/tag/detail/{id}
TagDetailsApilist_tag_detailGET /api/v3/tag/detail
TaskApiget_system_task_by_idGET /api/v3/system/task/{id}
TaskApilist_system_taskGET /api/v3/system/task
UiConfigApiget_ui_configGET /api/v3/config/ui
UiConfigApiget_ui_config_by_idGET /api/v3/config/ui/{id}
UiConfigApiupdate_ui_configPUT /api/v3/config/ui/{id}
UpdateApilist_updateGET /api/v3/update
UpdateLogFileApiget_log_file_update_by_filenameGET /api/v3/log/file/update/{filename}
UpdateLogFileApilist_log_file_updateGET /api/v3/log/file/update

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

X-Api-Key

  • Type: API key
  • API key parameter name: X-Api-Key
  • Location: HTTP header

apikey

  • Type: API key
  • API key parameter name: apikey
  • Location: URL query string

Author

About

No description or website provided.

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages