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 >=3.3 for video processing

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.19.tar.gz (40.0 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.19-py3-none-any.whl (39.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: MADAM-0.19.tar.gz
  • Upload date:
  • Size: 40.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for MADAM-0.19.tar.gz
Algorithm Hash digest
SHA256 50ed9f931b40ce9d00179ecfd7865c589cb286cd964a7b2ef2bb1d70fef36008
MD5 504ef507d6be692e039c9e825a160ebc
BLAKE2b-256 953e2d7237a69c2600bb2457b306cb8c31e53a0275aabe842536d72858c411bb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: MADAM-0.19-py3-none-any.whl
  • Upload date:
  • Size: 39.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for MADAM-0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 2acadafc27dd0d5a6f2c2c7b63f84788bde9d44108f7c5b28e9286b5280885c8
MD5 2843c5a6d8df13e8c441cc9996e5a931
BLAKE2b-256 129e4bcae7e886e970d935ab1fb745e1d4812e5543617fc44f776b79791397db

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