Skip to main content

Privacy-focused media processing with GPU acceleration and multi-cloud storage integration

Project description

Secure Media Processor

๐Ÿ”’ Professional-grade media processing with military-grade encryption, GPU acceleration, and multi-cloud storage integration

License: MIT Python 3.8+ Security: AES-256-GCM Tests codecov

Privacy-first โ€ข GPU-accelerated โ€ข Cloud-ready โ€ข Production-tested


๐ŸŒŸ Overview

Secure Media Processor is a production-ready, enterprise-grade solution for securely processing, encrypting, and storing media files across multiple cloud providers. Built with privacy and security as core principles, it offers seamless integration with AWS S3, Google Drive, and Dropbox, while maintaining complete local control over your data.

Why Choose Secure Media Processor?

  • โœ… Zero-Trust Architecture: All encryption happens locally before cloud upload
  • โœ… Plug-and-Play Cloud Connectors: Switch between S3, Google Drive, and Dropbox effortlessly
  • โœ… Production-Ready: Modular design, comprehensive error handling, and extensive logging
  • โœ… Performance-Optimized: GPU-accelerated processing for blazing-fast operations
  • โœ… Developer-Friendly: Clean API, comprehensive documentation, and extensible architecture

โœจ Key Features

๐Ÿ” Security & Privacy

  • Military-Grade Encryption: AES-256-GCM authenticated encryption
  • Local Processing: All sensitive operations happen on your machine
  • Secure Key Management: Protected key storage with restricted permissions
  • Integrity Verification: SHA-256 checksums ensure data integrity
  • Secure Deletion: Multi-pass overwrite before file removal

โ˜๏ธ Multi-Cloud Storage

  • AWS S3: Full S3 integration with server-side encryption
  • Google Drive: Native Google Drive API support
  • Dropbox: Seamless Dropbox integration
  • Unified Interface: Switch providers without changing your code
  • Connector Manager: Manage multiple cloud connections simultaneously

โšก High-Performance Processing

  • GPU Acceleration: CUDA-powered image and video processing
  • Batch Operations: Process multiple files efficiently
  • Smart Fallback: Automatic CPU fallback when GPU unavailable
  • Optimized Pipelines: Minimal overhead, maximum throughput

๐Ÿ› ๏ธ Developer Experience

  • Modular Architecture: Clean separation of concerns
  • Extensible Design: Easy to add new cloud providers or features
  • Comprehensive Logging: Track every operation for debugging and auditing
  • Type Hints: Full type annotations for better IDE support
  • Well-Documented: Inline documentation and usage examples

๐Ÿ“‹ Requirements

  • Python: 3.8 or higher
  • GPU (Optional): NVIDIA GPU with CUDA support for accelerated processing
  • Cloud Accounts (Optional): AWS, Google Cloud, or Dropbox accounts for cloud storage

๐Ÿš€ Quick Start

Installation

  1. Clone the repository:
git clone https://github.com/Isaloum/Secure-Media-Processor.git
cd Secure-Media-Processor
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure credentials:
cp .env.example .env
# Edit .env with your cloud storage credentials

Basic Usage

Encrypt and Upload to Cloud

# Encrypt a file
python main.py encrypt my-photo.jpg encrypted-photo.bin

# Upload to S3
python main.py upload encrypted-photo.bin --remote-key secure/photo.enc

Download and Decrypt

# Download from cloud
python main.py download secure/photo.enc downloaded.bin

# Decrypt the file
python main.py decrypt downloaded.bin recovered-photo.jpg

GPU-Accelerated Image Processing

# Resize image with GPU acceleration
python main.py resize photo.jpg resized.jpg --width 1920 --height 1080

# Apply filters
python main.py filter-image photo.jpg filtered.jpg --filter blur --intensity 1.5

System Information

# Check GPU availability and system info
python main.py info

๐Ÿ“š Documentation

๐Ÿ—๏ธ Architecture

Project Structure

Secure-Media-Processor/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ connectors/          # Cloud storage connectors
โ”‚   โ”‚   โ”œโ”€โ”€ base_connector.py       # Abstract base class
โ”‚   โ”‚   โ”œโ”€โ”€ s3_connector.py         # AWS S3 implementation
โ”‚   โ”‚   โ”œโ”€โ”€ google_drive_connector.py  # Google Drive implementation
โ”‚   โ”‚   โ”œโ”€โ”€ dropbox_connector.py    # Dropbox implementation
โ”‚   โ”‚   โ””โ”€โ”€ connector_manager.py    # Multi-connector management
โ”‚   โ”œโ”€โ”€ encryption.py        # Encryption/decryption logic
โ”‚   โ”œโ”€โ”€ gpu_processor.py     # GPU-accelerated media processing
โ”‚   โ”œโ”€โ”€ cloud_storage.py     # Legacy cloud storage (S3)
โ”‚   โ”œโ”€โ”€ config.py           # Configuration management
โ”‚   โ””โ”€โ”€ cli.py              # Command-line interface
โ”œโ”€โ”€ tests/                  # Test suite
โ”œโ”€โ”€ main.py                 # Application entry point
โ””โ”€โ”€ requirements.txt        # Python dependencies

Cloud Connector Design

The modular connector architecture allows seamless integration with multiple cloud providers:

from src.connectors import ConnectorManager, S3Connector, DropboxConnector

# Initialize connector manager
manager = ConnectorManager()

# Add connectors
manager.add_connector('s3', S3Connector(
    bucket_name='my-bucket',
    region='us-east-1'
))
manager.add_connector('dropbox', DropboxConnector(
    access_token='your-token'
))

# Connect all providers
manager.connect_all()

# Upload to active connector
manager.upload_file('file.txt', 'remote/file.txt')

# Upload to specific provider
manager.upload_file('file.txt', 'file.txt', connector_name='dropbox')

# Sync file across multiple clouds
manager.sync_file_across_connectors(
    'important.txt',
    source_connector='s3',
    target_connectors=['dropbox', 'gdrive']
)

๐Ÿงช Testing & CI/CD

Test Suite

The project includes comprehensive automated tests for all cloud connectors with 66% overall code coverage:

# Run all cloud connector tests
pytest tests/test_dropbox_connector.py tests/test_s3_connector_new.py tests/test_google_drive_connector_new.py -v

# Run with coverage reporting
pytest tests/ --cov=src/connectors --cov-report=term-missing

Coverage Metrics:

  • S3 Connector: 87%
  • Google Drive Connector: 82%
  • Dropbox Connector: 65%
  • Overall: 66%

Testing Strategy

All connector tests use global mocking fixtures for consistent, isolated testing:

  • Dropbox: mock_dbx_global fixture mocks dropbox.Dropbox class
  • S3: mock_s3_client_global and mock_s3_resource_global fixtures mock boto3.client() and boto3.resource()
  • Google Drive: mock_gdrive_service_global fixture mocks googleapiclient.discovery.build()

This approach ensures:

  • No actual cloud API calls during testing
  • Fast test execution (all 45 tests run in ~1 second)
  • Predictable test behavior without external dependencies
  • Easy debugging with controlled mock responses

Continuous Integration

Every push and pull request triggers automated testing via GitHub Actions:

Workflow: .github/workflows/python-tests.yml

Pipeline Steps:

  1. Environment Setup: Python 3.11, install dependencies
  2. Test Execution: Run all connector tests with verbose output
  3. Coverage Analysis: Generate coverage reports (XML + terminal)
  4. Coverage Upload: Publish to Codecov with connector-tests flag

View CI Status: All workflow runs are visible in the Actions tab

Adding New Connector Tests

To add tests for a new connector:

  1. Create tests/test_<connector>_connector.py
  2. Add a global fixture using autouse=True and scope="function"
  3. Mock the SDK/API constructor using monkeypatch.setattr()
  4. Write tests using the global mock with reset_mock() between tests
  5. Update CI workflow to include your test file

Example template:

import pytest
from unittest.mock import MagicMock

@pytest.fixture(autouse=True)
def mock_sdk_global(monkeypatch):
    """Global mock for SDK client"""
    mock = MagicMock()
    monkeypatch.setattr('sdk_module.Client', lambda *args, **kwargs: mock)
    yield mock
    mock.reset_mock()

def test_upload(mock_sdk_global):
    connector = MyConnector()
    connector.upload_file('test.txt', 'remote.txt')
    assert mock_sdk_global.upload.called

๐Ÿ”’ Security Workflow

  1. Local Encryption: Files are encrypted on your machine using AES-256-GCM
  2. Checksum Generation: SHA-256 hash calculated for integrity verification
  3. Secure Upload: Encrypted data transmitted to cloud with TLS
  4. Server-Side Encryption: Additional encryption layer at cloud provider
  5. Integrity Verification: Checksum verified on download
  6. Secure Decryption: Files decrypted only on your local machine

๐Ÿ—บ๏ธ Roadmap

Current Version (v1.0)

  • โœ… AES-256-GCM encryption
  • โœ… Multi-cloud connectors (S3, Google Drive, Dropbox)
  • โœ… GPU-accelerated image processing
  • โœ… Comprehensive CLI interface

Upcoming Features

  • ๐Ÿ”ฒ Video Processing: GPU-accelerated video encoding/transcoding
  • ๐Ÿ”ฒ Azure Blob Storage: Azure connector implementation
  • ๐Ÿ”ฒ End-to-End Encryption: Zero-knowledge cloud storage
  • ๐Ÿ”ฒ Web Interface: Browser-based UI for easier management
  • ๐Ÿ”ฒ Automated Backups: Scheduled backup across multiple clouds
  • ๐Ÿ”ฒ File Versioning: Track and restore previous file versions
  • ๐Ÿ”ฒ Compression: Intelligent compression before encryption
  • ๐Ÿ”ฒ CI/CD Pipeline: Automated testing and deployment
  • ๐Ÿ”ฒ Docker Support: Containerized deployment
  • ๐Ÿ”ฒ API Server: RESTful API for programmatic access

๐Ÿค Contributing

We welcome contributions! Whether you're fixing bugs, improving documentation, or adding new features, your help makes this project better.

See CONTRIBUTING.md for guidelines.

๐Ÿ” Security

Security is our top priority. If you discover a security vulnerability, please see our Security Policy for responsible disclosure guidelines.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Built with โค๏ธ for privacy-conscious users
  • Inspired by the need for secure, cross-platform media management
  • Special thanks to all contributors and the open-source community

๐Ÿ“ž Support & Contact


โญ If you find this project useful, please consider giving it a star! โญ

Secure Media Processor - Your privacy, your control, your cloud.

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

secure_media_processor-1.0.0.tar.gz (71.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secure_media_processor-1.0.0-py3-none-any.whl (41.3 kB view details)

Uploaded Python 3

File details

Details for the file secure_media_processor-1.0.0.tar.gz.

File metadata

  • Download URL: secure_media_processor-1.0.0.tar.gz
  • Upload date:
  • Size: 71.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.1

File hashes

Hashes for secure_media_processor-1.0.0.tar.gz
Algorithm Hash digest
SHA256 722378a51658767704c7eff21077a6791987c455c7f198a0072c805b306ada0a
MD5 d63f2e63522057c717de94a0f535cdff
BLAKE2b-256 7e65ff3e6254364a1ec7651193911cb0c7a5edf0ce5e126ee4438995700e3cbf

See more details on using hashes here.

File details

Details for the file secure_media_processor-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for secure_media_processor-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2896332b14a394c2859747f76729448fb623aaf01b0821b6b1a7cda114fcb0c6
MD5 cfe4b8412c5d3294fdc5d0fcba04d923
BLAKE2b-256 b00c2a20f4d7787d99e5680181c4aad131e58d91953e5d22e1ec79fff5e9645c

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