Skip to main content

This is a fairly low-level wrapper around the MediaAmp/MPX endpoints provided by theplatform.com. It primarily handles token authentication and provides HTTP methods with configurable default parameters (e.g. schema) for the service endpoints. Because of the multitude of available parameters available at each endpoint this package is intended to be used by your application to build your own abstractions on top of the request and response data. Currently it only supports the JSON (and cJSON) forms.

https://travis-ci.org/cordmata/mediaampy.svg?branch=master

Usage

To get started, supply your credentials: username, password, account id (This is a URL and can be found on the “About” screen in the MPX console). You can optionally supply an authentication token if you have one.

import mediaamp
session = mediaamp.Session(
    'example@example.com',
    'very_very_secret',
    'http://access.auth.theplatform.com/data/Account/{{YOURID}}',
    auth_token='YOUR_TOKEN',
)

Once initialized, you can obtain services by key lookup:

media_data = session['Media Data Service']

The endpoints on the service have get(), put(), post(), and delete() methods you can use depending on the actions you are taking.

media_item = media_data.Media.get('{{MEDIA_ID}}')
media_item['description']

You can specify your own defaults per-endpoint by calling the endpoint object.

media = media_data.Media(schema='1.8', form='cjson')

Installation

pip install mediaampy

Or you can clone the source and run:

make init

Release files for mediaampy 0.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mediaampy 0.2.8
File Size Uploaded
mediaampy-0.2.8.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mediaampy 0.2.8
File Interpreter ABI Platform
mediaampy-0.2.8-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 17.0 kB

Release files / mediaampy-0.2.8.tar.gz

Download URL mediaampy-0.2.8.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2bcbe64469d63a8ffd12a44aecb96ed75ee718a1d64a6e4d1d17f28268ba429e
BLAKE2b-256 checksum
How to use checksums
c7d62036df4c6736661343d43aa54416889615d131cfbcf5a2fb98d794672815
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / mediaampy-0.2.8-py2.py3-none-any.whl

Download URL mediaampy-0.2.8-py2.py3-none-any.whl
Size 9.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4a832957dc95309607f581d39d3d4a8d4c492e0a2e55eac5d8a10742ba086a7d
BLAKE2b-256 checksum
How to use checksums
c0852a50ec1d7cddc60c9e30743b781d9f5619886f5565fba06c500f1df05410
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.8 This release

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page