Catalog PyPI
PACKAGE EXPLORERView in registry

agoras-media

PyPI

Image and video processing for Agoras social media manager

imagemediaprocessingvideo
Versions collected1
Direct dependencies4From release 2.2.0
Last observed21 Oct, 09:21 UTC

README

Version 2.2.0 documentation
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)

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
2.2.026 Aug 20264

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
luisalejandro/agoras

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:21 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:faeede1729dc026c37e6574b5031fcb0a361a198b7f0a979fc1cce5601f60d17