Skip to main content

A high-level API interface for MediaMosa.

Project description

mediamosa is a python wrapper for accessing a mediamosa ( api.


Install mediamosa as follows:

pip install mediamosa

Getting Started

Start by creating a connection to a mediamosa api.

>>> from mediamosa.api import MediaMosaAPI
>>> api = MediaMosaAPI('')
>>> api.authenticate('USERNAME', 'PASSWORD')

the .authentication() method returns a boolean indicating if the username and password were accepted by the server.

You can now query your assets

>>> api.asset_list()
[<mediamosa.resources.Asset GAKkgcmMPaIZdMl3dczqUESA>,
<mediamosa.resources.Asset KWdqPljZge6ESLWbPdEEcG0j>,
<mediamosa.resources.Asset d1bbGsmEjXmeSfM8PGT5uRjB>,
<mediamosa.resources.Asset uKgRwHGTidLLiTiSUQu26buN>,
<mediamosa.resources.Asset x2XRGwefXfNvoRNYLJjfWS5O>,
<mediamosa.resources.Asset ONZDQiGfhTf8OcsKumKISpOy>,
<mediamosa.resources.Asset A1lkCZclpXaWSLE9RPK4Pthk>,
<mediamosa.resources.Asset A2TmfbWMcMU6r8jWHOS2JEsf>,
<mediamosa.resources.Asset B7zsZXLvnnLCCIyJOrCQxxRl>,
<mediamosa.resources.Asset C2VNSEfaeMc7ToOeirEqiztz>, ...]

Each direct child of an <item> can be accessed as an attribute:

>>> asset = api.asset_list()[0]
>>> asset.dublin_core.get('title')
u'big buck bunny '

You can also indiviually request specific assets by querying the api object:

>>> api.asset('ONZDQiGfhTf8OcsKumKISpOy')
<mediamosa.resources.Asset ONZDQiGfhTf8OcsKumKISpOy>

Mediafiles connected to the asset can also be queried:

>>> asset.list_mediafiles()
[<mediamosa.resources.Mediafile (mp4) Yb8peCXknRXIhimONUUzkuBT>]
>>> mediafile = asset.list_mediafiles()[0]
>>> mediafile.filename
>>> mediafile.is_downloadable

You can also individually request mediafiles by querying the api object:

>>> api.mediafile('Yb8peCXknRXIhimONUUzkuBT')
<mediamosa.resources.Mediafile (mp4) Yb8peCXknRXIhimONUUzkuBT>

Playing a mediafile is done as follows:

u'<script type="text/javascript">...'

This will by default return javascript code necessary to play the mediafile.


If anything goes wrong with executing the queries, the API will throw a mediamosa.api.ApiException.

Bugs and Feature requests

For help, issues and feature requests, please go to


Pull requests may be submitted to the develop branch at our github project. Make sure the code and functionality are sufficiently documented.

Download files

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

Source Distribution

mediamosa-0.0.5.tar.gz (13.0 kB view hashes)

Uploaded source

Supported by

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