Provides object-oriented Opencast API call support.
Project description
OpencastAPI
The opencastapi
package offers an object-oriented to the Opencast Project's API.
Features
- Object-oriented interface.
- Multitarget/multinode support (currently limited to a common username and password across nodes per configuration).
- Abstracted, persisted, and reusable configuration.
Installation
pip install opencastapi
Configuration
The default configuration path is /etc/opencastapi/opencastapi.conf
, but can
be overridden by setting the environment variable OPENCASTAPI_CONF_PATH
.
Example Configuration
[Security]
username=myapiusername
password=myapipassword
[Targets]
admin_prod=https://admin.opencast.org
player_prod=https://player.opencast.org
admin_dev=https://admin-dev.opencast.org
player_dev=https://player-dev.opencast.org
Usage
Simple example:
import opencastapi
workflows_call = opencastapi.create_call(target='admin_dev', http_verb='get', path='/api/workflows')
response = workflows_call()
print(response.text)
Example with filter
import opencastapi
filter = {"filter":"start:2021-11-16T00:00:00+01:00/2021-11-16T23:59:59+01:00}
workflows_call = opencastapi.create_call(target='admin_dev', http_verb='get', path='/api/workflows', parameters=filter)
response = workflows_call()
print(response.text)
License
It was developed separate from the https://opencast.org/ project, and is also intentionally licensed differently, using the non-copyleft MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for opencastapi-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f354289acd77e5790189602206326fbe1774d2d60a17056b41e53b71eb7f976 |
|
MD5 | 497e75ddf6a163d0ff68e2785d5e6a8d |
|
BLAKE2b-256 | a411e876f71d0a67227cabe138d2074a0cd7c327b8de9fddda8618e0edbf7f87 |