Metadata-Version: 2.4
Name: media2url
Version: 1.0.0
Summary: Official Python client for Media2URL — Instant Cloud Media Hosting & Permanent Direct CDN Links.
Author-email: Media2URL <support@media2url.com>
Project-URL: Homepage, https://media2url.com/
Project-URL: Documentation, https://media2url.com/
Project-URL: Image Converter, https://media2url.com/image-to-url
Project-URL: Video Converter, https://media2url.com/video-to-url
Project-URL: PDF Converter, https://media2url.com/pdf-to-url
Keywords: media2url,image-to-url,video-to-url,pdf-to-url,cdn,image-hosting
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Multimedia :: Graphics
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Media2URL Python SDK

[![PyPI version](https://img.shields.io/pypi/v/media2url.svg)](https://pypi.org/project/media2url/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)

Official Python client for [Media2URL](https://media2url.com/) — High-performance cloud media hosting, direct image-to-URL converter, video CDN delivery, and permanent PDF asset hosting.

Convert local screenshots, images, videos, and PDFs into permanent, edge-cached direct CDN URLs with zero viewer bloatware.

---

## Key Features

* **[Image to URL Converter](https://media2url.com/image-to-url)**: Upload PNG, JPEG, WEBP, and SVG files to receive instant, permanent direct hotlinks for web applications and markdown documentation.
* **[Video to URL Hosting](https://media2url.com/video-to-url)**: Fast cloud asset distribution for MP4, WEBM, and short clips with global edge delivery.
* **[PDF to URL Hosting](https://media2url.com/pdf-to-url)**: Permanent direct links for technical whitepapers, guides, and PDF documents.
* **Pure Python**: Zero heavy third-party dependencies; uses native HTTP multipart streaming.

---

## Installation

Install the package directly from PyPI:

```bash
pip install media2url
```

---

## Quickstart

### 1. Upload an Image to a Direct CDN Link

```python
from media2url import Media2URL

# Initialize client
client = Media2URL()

# Upload an image file (PNG, JPEG, WEBP, SVG)
cdn_url = client.upload_image("assets/screenshot.png")
print("Permanent Direct Image URL:", cdn_url)
```

### 2. Upload Video Assets

```python
# Upload video clips (MP4, WEBM)
video_url = client.upload_video("recordings/demo.mp4")
print("Permanent Direct Video URL:", video_url)
```

### 3. Upload PDF Documents

```python
# Upload PDF documents
pdf_url = client.upload_pdf("docs/specification.pdf")
print("Permanent PDF Document URL:", pdf_url)
```

---

## Why Media2URL?

Traditional image hosts force visitors through slow landing pages, ad-supported viewers, and aggressive expiration timers. [Media2URL](https://media2url.com/) gives developers direct access to raw asset links optimized for HTML embeds, markdown documents, Discord bots, and automated publishing workflows.

* **Main Gateway**: [https://media2url.com/](https://media2url.com/)
* **Image Converter Utility**: [https://media2url.com/image-to-url](https://media2url.com/image-to-url)
* **Video Converter Utility**: [https://media2url.com/video-to-url](https://media2url.com/video-to-url)
* **PDF Converter Utility**: [https://media2url.com/pdf-to-url](https://media2url.com/pdf-to-url)

---

## License

Distributed under the MIT License. See `LICENSE` for more information.
