Current collected state Current
Observed since 21 Oct, 09:21 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Image and video processing for Agoras social media manager
agoras-media
============
Image and video processing for social media platforms.
Installation
------------
.. code-block:: bash
pip install agoras-media
Contents
--------
- **MediaFactory**: Factory for creating Image and Video instances
- **Image**: Image download, validation, and processing
- **Video**: Video download, validation, and platform-specific limits
Usage
-----
.. code-block:: python
import asyncio
from agoras.media import MediaFactory, Image, Video
# Create and download images
async def download_image():
image = Image('https://example.com/image.jpg')
await image.download()
# Use image.content, image.temp_file
image.cleanup()
# Create platform-specific video
async def download_video():
video = MediaFactory.create_video('https://example.com/video.mp4', 'facebook')
await video.download()
# Use video.content, video.temp_file
video.cleanup()
# Download multiple images
async def batch_download():
images = await MediaFactory.download_images([
'https://example.com/image1.jpg',
'https://example.com/image2.jpg'
])
for img in images:
print(f'Downloaded: {img.url}')
img.cleanup()
asyncio.run(download_image())
Media constraints
-----------------
Per-platform MIME, size, duration, and transfer limits live in
``agoras.media.constraints``. Wrappers and ``MediaFactory`` import the same
table; do not hardcode limits elsewhere.
To inspect limits::
agoras utils media-limits
agoras utils media-limits --platform discord --kind video
To add a platform row, edit ``constraints.py`` and run::
pytest packages/media/tests/test_constraints_contract.py
Dependencies
------------
- agoras-common
- Pillow (image processing)
- opencv-python-headless (video duration and validation)
- filetype (file type detection)
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 2.2.0 | 26 Aug 2026 | 4 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 09:21 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:faeede1729dc026c37e6574b5031fcb0a361a198b7f0a979fc1cce5601f60d17