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.
Metadata
Release files for medialoopster 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| medialoopster-0.3.1.tar.gz | 7.2 kB | Without provenance | Details for medialoopster-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| medialoopster-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for medialoopster-0.3.1-py3-none-any.whl |
Total release size: 14.3 kB
Release files / medialoopster-0.3.1.tar.gz
| Download URL | medialoopster-0.3.1.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
046322be171757fd6a22fecd70df04b14686db4925b9bd3f0a134d45845fb34f
|
|
BLAKE2b-256 checksum How to use checksums |
a55b7e709c0f0efe10781a2ef8dd1960a9bb3bf2495e8e2e05a49be3ccefd963
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / medialoopster-0.3.1-py3-none-any.whl
| Download URL | medialoopster-0.3.1-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
453e8490b5c55678dc83420ef5892d9b04bdd0471411de0a202d11315a4e3015
|
|
BLAKE2b-256 checksum How to use checksums |
1741fe7a8129861ebe150eeac979e7875c409cb379597938bddee0303556d4c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for medialoopster 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.