Skip to main content

medialoopster API wrapper for Python

Project description

medialoopster

medialoopster API wrapper for Python

medialoopster is a wrapper library for the HTTP API of the medialoopster Media Asset Management System.

Installation

pip install medialoopster

Features

  • Connect to medialoopster API with authentication
  • Retrieve and manage productions
  • Get, create, update, and delete assets (video, audio, image, project)
  • Search for assets by metadata
  • Archive and restore assets
  • Manage asset approval status
  • Handle shots and sequences for video assets

Usage Examples

Basic Connection

from medialoopster import Medialoopster

# Initialize the client
client = Medialoopster(
    url="https://medialoopster.example.com/api/",
    user="username",
    password="password",
    verify=True  # Set to False to disable SSL verification
)

# Check if the API is reachable
if client.ping():
    print("Connected to medialoopster API!")
else:
    print("Failed to connect to medialoopster API")

Working with Productions

# Get all productions
productions = client.productions()
for production in productions:
    print(f"Production: {production.name} (ID: {production.id})")

# Get a specific production by ID
production = client.production(production_id=123)

# Get a specific production by name
production = client.production(production_name="My Production")

Working with Assets

# Get video assets for a production
assets = client.get_videoassets(production_id=123)
for asset in assets:
    print(f"Asset: {asset.get('name')} (ID: {asset.get('id')})")

# Get a specific asset
asset = client.get_asset(asset_id=456)

# Import a new asset
asset_id = client.asset_import(
    production="My Production",
    asset_type="video",
    name="My Video",
    path_file="/path/to/file.mp4",
    meta_field_store={"key": "value"}
)

# Approve an asset
client.approve_asset(asset_id=456)

# Delete an asset
client.delete_asset(asset_id=456)

Error Handling

from medialoopster import Medialoopster
from medialoopster.exceptions import (
    MedialoopsterError,
    MedialoopsterConnectionError,
    MedialoopsterAuthenticationError,
    MedialoopsterNotFoundError
)

client = Medialoopster(url="https://medialoopster.example.com/api/")

try:
    asset = client.get_asset(asset_id=999999)
except MedialoopsterNotFoundError:
    print("Asset not found")
except MedialoopsterConnectionError:
    print("Connection error")
except MedialoopsterError as e:
    print(f"An error occurred: {e}")

Documentation

For more detailed documentation, please refer to the docstrings in the code or visit the medialoopster API documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

medialoopster-0.3.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

medialoopster-0.3.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file medialoopster-0.3.0.tar.gz.

File metadata

  • Download URL: medialoopster-0.3.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for medialoopster-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a0962efb74e9dcddcac397f1e536fadd016bc2cb14ea3c0e71c972cdf6ce27c7
MD5 b32ed400a73936419af30d5ff6f76c5a
BLAKE2b-256 f1cd4d9f39f9f7574102f2db5dd898798f04b967ebf0d818d6e3029e278aa0be

See more details on using hashes here.

File details

Details for the file medialoopster-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: medialoopster-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for medialoopster-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 168e852674b5f5a230118ea0f123e0831129cadfca7bfe781f1f7fc2fe5f4d84
MD5 33dbdae37b7b8a6338fd9f019980862c
BLAKE2b-256 40ad49bb374535621e91324e912a94b3c76c911f65e32e725924fadc19867106

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