Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
MADAM
Multimedia Advanced Digital Asset Management
|travis-badge|_ |coveralls-badge|_ |pypi-badge|_ |readthedocs-badge|_
.. |travis-badge| image:: https://api.travis-ci.org/eseifert/madam.svg?branch=master .. _travis-badge: https://travis-ci.org/eseifert/madam .. |coveralls-badge| image:: https://coveralls.io/repos/github/eseifert/madam/badge.svg?branch=master .. _coveralls-badge: https://coveralls.io/github/eseifert/madam?branch=master .. |pypi-badge| image:: https://img.shields.io/pypi/v/madam.svg? .. _pypi-badge: https://pypi.python.org/pypi/MADAM .. |readthedocs-badge| image:: https://readthedocs.org/projects/madam/badge/?version=latest .. _readthedocs-badge: http://madam.readthedocs.io/en/latest/?badge=latest
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.
.. quickstart_start
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:
.. code:: shell
pip install madam
Initialization:
.. code:: pycon
>>> from madam import Madam
>>> manager = Madam()
Define settings for different file formats:
.. code:: pycon
>>> config = {
... 'image/jpeg': dict(
... quality=85,
... ),
... }
>>> manager = Madam(config)
Reading a JPEG image and extracting metadata:
.. code:: pycon
>>> 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:
.. code:: pycon
>>> 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:
.. code:: pycon
>>> convert_to_png = processor.convert(mime_type='image/png')
>>> png_asset = convert_to_png(asset)
>>> with open('path/to/file.png', 'wb') as file:
... manager.write(png_asset, file)
FAQs
Digital asset management library
We found that MADAM demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.