Skip to main content

The official Python client library for accessing the SermonAudio.com APIs

Project description

SermonAudio.com API Client Library

This is the official Python client library for accessing the latest SermonAudio.com APIs.

For documentation on the SermonAudio API, head to api.sermonaudio.com. Proper Python type conversions have been made where appropriate (for example, dates are converted to datetime.date objects). API functions are grouped into modules by API family, just as in the main documentation (so Node API endpoint helpers are in the node module). Endpoint request methods are given an appropriate prefix such as get.

Detailed documentation is included with each method. If you have any questions about how to use these methods, or feel the docstrings could be improved, send a message to developer@sermonaudio.com.

Installation Notes

This library is written in Python 3.6+. Please ensure that you have the latest version of OpenSSL installed. If you are on a Mac, you may need to use homebrew to install a new verison of python linked against the updated version via brew install python3 --with-brewed-openssl. Unfortunately, older versions of OpenSSL do not support TLSv1.2. Older versions have known security holes, so our server will refuse such connections. Make sure to use the new (brewed) version of python for your virtual environment.

Quickstart

The API functions are straightforward. All API methods validate the response from the server, and return a logical value from the wrapped response, or throw an exception. For example, a node that returns a single result will return only the first item in the results list, if one exists. Additionally, the object(s) returned are mapped to the correct type of object. Here are some code samples to get you started.

import sermonaudio

from sermonaudio.node import Node

# You must set your API key before making any requests
sermonaudio.set_api_key('YOUR-API-KEY')

sermon = Node.get_sermon_info('261601260')
# TODO: Something with this sermon

for sermon in Node.get_sermons(broadcaster_id='faith'):
    # TODO: Something with each sermon in the list
    pass

All methods have docstrings, so you can refer to this documentation as you write your application. We do encourage you to read the full documentation referenced above for the most complete, up to date details.

Localization

While our localization project is still in its early stages, this client library is aware of the support. In general, it should "just work" if we support your language and key strings will be localized server-side. However, if you are running in an environment with a different locale than your users, you can override the preferred language either globally or per-request. You can override it globally using the top-level set_preferred_language function. All request methods also accept a preferred_language_override keyword argument so you can override this globally. The are passed via the HTTP Accept-Language header, and should follow that format. For example, en-US for US English.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sermonaudio-6.4.1.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sermonaudio-6.4.1-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file sermonaudio-6.4.1.tar.gz.

File metadata

  • Download URL: sermonaudio-6.4.1.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for sermonaudio-6.4.1.tar.gz
Algorithm Hash digest
SHA256 fcb07aa5d52b74085e3fcc93156655c38c83e9370e8cd064ddbbdc11f34eec18
MD5 3be37f8b043c173f62851e827be14ef1
BLAKE2b-256 5e87a11a379629ab5113f492d48f78b64508ca43c45f04d712e71be8ab5cc913

See more details on using hashes here.

File details

Details for the file sermonaudio-6.4.1-py3-none-any.whl.

File metadata

  • Download URL: sermonaudio-6.4.1-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for sermonaudio-6.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 93453764fb978c4c1c28b7c381deb29492770fdc6cfd596a16b3d781c2b71908
MD5 6ee32479eb557b1043db532b597a6a9f
BLAKE2b-256 df060fe967c188cfaef12cba9076c87bed0ff0695e40f5cf82e0de8c6b6af525

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page