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.14.tar.gz (37.7 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.14-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for MADAM-0.14.tar.gz
Algorithm Hash digest
SHA256 2630c95a2308f7bbdb4791738930abca37b361256bd68653b2077e24e94685f6
MD5 77f39e80288090e5e53459b6ad6665b2
BLAKE2b-256 fc760139ad38a328ad256c0a57951fade0690d7a2164612c3679f8b7c6ab94d3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for MADAM-0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 3e0d3f3918bdc55b2442e66707c374fbee535e49247bcfc0814a05446f60d389
MD5 158a88307c80468540866a25829d3ded
BLAKE2b-256 eadd141f5d40fd7e2dd19aeb02e8bc4dfe1ced96bb46abb1726ed7ce467600e1

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