Skip to main content

Digital asset management library

Project description

Multimedia Advanced Digital Asset Management

travis-badge coveralls-badge pypi-badge readthedocs-badge

MADAM is a digital asset management library. It aims to facilitate the handling of image, audio, and video files by helping out with several tasks, like storing, organizing, and transforming asset data.

Installation

MADAM makes use of other software, which needs to be installed on your system. Make sure you have the following packages installed:

  • FFmpeg >=0.9

  • libexiv2 >=0.20 (with header files)

  • boost.python >=1.48 (with header files)

After you installed these, MADAM can be installed by grabbing the latest release from PyPI:

pip install madam

Usage

Initialization:

>>> from madam import Madam
>>> manager = Madam()

Reading a JPEG image and extracting metadata:

>>> with open('path/to/file.jpg', 'rb') as file:
...     asset = manager.read(file)
>>> asset.mime_type
'image/jpeg'
>>> asset.width
800
>>> asset.height
600

Changing the size of an image asset:

>>> processor = manager.get_processor(asset.essence)
>>> make_thumbnail = processor.resize(width=100, height=100)
>>> resized_asset = make_thumbnail(asset)
>>> resized_asset.width
100
>>> resized_asset.height
100

Converting an image to a different file format and saving it to a file:

>>> convert_to_png = processor.convert(mime_type='image/png')
>>> png_asset = convert_to_png(asset)
>>> with open('path/to/file.png', 'wb') as file:
...     madam.write(png_asset, file)

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

MADAM-0.16.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

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

MADAM-0.16-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file MADAM-0.16.tar.gz.

File metadata

  • Download URL: MADAM-0.16.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for MADAM-0.16.tar.gz
Algorithm Hash digest
SHA256 91d20e4a958a6573a1d3726f68baf2b57cc46ff06629edea5ee45e981dfaa3bd
MD5 f0715fa1c3094c32c251ce7fc218e1cf
BLAKE2b-256 c0ac2aa3e6f24e1623139c0e39dd0abf99d077655996484e7af90cf83afc3613

See more details on using hashes here.

File details

Details for the file MADAM-0.16-py3-none-any.whl.

File metadata

  • Download URL: MADAM-0.16-py3-none-any.whl
  • Upload date:
  • Size: 39.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for MADAM-0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 e94551ad239675dadddbec9707f6726f4d02ff6f982bf2b0f040e7a3e9897114
MD5 9a0ab6360ada76050be5d0e0e694f71e
BLAKE2b-256 cfb604a527478526befeee06228cdc8c30062cda33c051a6babcf2c0a284f431

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