Skip to main content

Converters UniConvert Library

Welcome to the UniConvert Library documentation! The UniConvert Library is a Python tool designed for file conversion. It provides support for converting images to PNG format and videos to MP4 format. With this library, you can easily integrate file conversion capabilities into your projects.

Main Features

  • Image Conversion: Convert images to the PNG, JPEG, WEBP, BMP, JPG, PDF, GIF and TIFF formats.
  • Video Conversion: Convert videos to the MP4, AVI, MOV, 3GPP, FLV, WMV, MPG, WEBM and MKV formats.

How to Use

  1. Install the library: pip install uniconvert
  2. Import the relevant converters in your Python script.
  3. Create instances of the converters and use their convert methods to perform conversions.

A seguir, apresentamos exemplos básicos de uso:

Conversion of Images

from uniconvert.img_converter import PNGConverter

converter_img = PNGConverter()

img_path = "path/to/image.jpg"

converted_img_path = converter_img.convert(img_path)

print(f"Converted Image: {img_path} -> {converted_img_path}")

OR

from uniconvert import img_converter

converter_img = img_converter.PNGConverter()

img_path = "path/to/image.jpg"

converted_img_path = converter_img.convert(img_path, replace=True)

print(f"Converted Image: {img_path} -> {converted_img_path}")

If you want that converted file replace the original then you can use replace=True in convert method.

Converting Videos

from uniconvert.video_converter import MP4Converter

# Cria uma instância do conversor
video_converter = MP4Converter()

# Converte um vídeo para MP4
video_path = "caminho/do/video.avi"
converted_video_path = video_converter.convert(video_path, replace=True)

print(f"Converted Video: {video_path} -> {converted_video_path}")

All the other conversion classes follow the same pattern. You just need to specify the extension name, for example, MP4Converter(),AVIConverter(), GPP3Converter(), and so on.

Video Supported Extensions:

  • AVI
  • MOV
  • 3GPP
  • FLV
  • WMV
  • MPG
  • WEBM
  • MKV

Image Supported Extensions:

  • PNG
  • JPEG
  • WEBP
  • BMP
  • JPG
  • PDF
  • GIF
  • TIFF

Roadmap

We are committed to expanding the functionalities of this library. Planned future enhancements include:

  • Support for audio file conversion.
  • Creation of specific classes for each file type.

Contact

Email: dudulj@live.com

GitHub: edududs

License

MIT License

Copyright (c) 2023 Eduardo Lima de Jesus

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for UniConvert 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for UniConvert 0.2
File Size Uploaded
UniConvert-0.2.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for UniConvert 0.2
File Interpreter ABI Platform
UniConvert-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.0 kB

Release files / UniConvert-0.2.tar.gz

Download URL UniConvert-0.2.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2ec4694c9ffed66d062d48af5159611039bcfb3261060d9061c00ca2c4f4701e
BLAKE2b-256 checksum
How to use checksums
80ea1f4e651f609a0c6bbf20369b96b2c7eae5887fab3bb8d8483cf6865c261e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / UniConvert-0.2-py3-none-any.whl

Download URL UniConvert-0.2-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34b974ea7986368c61ea672f50a9bb387a1dd858f36da346d6685c9dfc418b82
BLAKE2b-256 checksum
How to use checksums
9ea6e4bfb1ae18e89854a4c84ff00140022c8360e8c838a21e970f084a03a581
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page