Import this client module from within your Python application or script to use media-nommer. Note that this API requires feederd to be running and reachable by the host that your Python application is on.
Returns an APIConnection object, which is what you make API calls through. This is lazily loaded, so connect away without worry of overhead from instantiation alone. You shouldn’t take much of a performance hit until you actually perform some API calls.
Parameters: | api_hostname (str) – A URL with protocol, hostname, and port. No trailing slash. |
---|---|
Returns: | An APIConnection object, which has methods on it that map to feederd’s RESTful API. |
This is the top-level API module. You should generally instantiate the APIConnection object in here by using media_nommer_api.connect() instead of direct initialization of APIConnection.
The APIConnection class is your link to feederd, which runs a JSON API.
Your application’s means of communicating with feederd’s JSON API. The public methods on this class correspond to API calls.
API calls return APIResponse objects with the results of your queries. Check the APIResponse.data attrib for your un-serialized results.
Tip
Do not instantiate this class directly. Use the media_nommer_api.connect() function for that purpose.
Variables: | api_hostname (str) – The protocol, hostname, and port in URI format. |
---|
This should generally only be called by media_nommer.client.connect().
Do any setup work to prepare this object for communication with feederd’s API. This method constructor should be as lazy as possible.
Parameters: | api_hostname (str) – A URL with protocol, hostname, and port. No trailing slash. |
---|
Submits an encoding job to feederd. This is an async call, so you may want to specify a notify_url for job state notifications to be sent to.
Parameters: |
|
---|---|
Returns: | An APIResponse object containing feederd‘s response. |
API request and response abstraction and helpers. This module and its contents should not be instantiated directly.
An abstraction class that all outbound API requests to feederd are wrapped in. Handles some basic serialization and transport stuff.
Variables: | |
---|---|
Parameters: |
|
A basic API response. Performs some simple error handling and provides helpers to check the response for success or failure.
Your application will be interested in this class’s data instance variable, which contains the server’s response.
Variables: |
|
---|---|
Parameters: |
|