PyConvertAPI Image Converter
PyConvertAPI Image Converter is a Python library for converting images to different formats using ConvertAPI. ConvertAPI is a cloud based file conversion API. It allows you to convert files from one format to another. It supports over 200 different file formats and conversion types. ConvertAPI is a paid service. You can sign up for a free account and get 100 free conversions per month. You can also get a paid account with more conversions per month. You can find more information about ConvertAPI at convertapi.com.
Installation
- Ensure you have python3 and pip installed on your system.
- You can the install PyConvertAPI Image Converter using pip:
pip install pyconvertapi-image-converter
Usage
Importing the library
To use the library, you need to import it into your project. You can import the library using the following code:
import pyconvertapi_image_converter
Creating a ConvertAPIImageConverter object
To create a ConvertAPIImageConverter object as well to as convert an image, you need to provide your ConvertAPI secret. You can get your ConvertAPI secret from your ConvertAPI account. You can create a ConvertAPIImageConverter object using the following code:
from pyconvertapi_image_converter import ConvertAPIImageConverter
# Create a ConvertAPIImageConverter object
converter = ConvertAPIImageConverter('your_secret')
# Convert an image to PNG format
converter.convert(path='path/to/image.jpg', to_format='png')
# Convert an image to SVG format
converter.convert(path='path/to/image.jpeg', to_format='svg')
Converting all images in a directory
To convert all images in a directory, you can use the following code:
from pyconvertapi_image_converter import ConvertAPIImageConverter
converter = ConvertAPIImageConverter('your_secret')
# Convert all images in a directory to PNG format
converter.convert('path/to/directory', to_format='png')
Supported formats
To get a list of supported formats, you can use the following code:
from pyconvertapi_image_converter.image_converter import to_formats, from_formats
# Get a list of supported formats for input files
print(from_formats)
# Get a list of supported formats for output files
print(to_formats)
License
PyConvertAPI Image Converter is licensed under the MIT
Contributing
Pull requests and feedbacks are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Authors and acknowledgment
Metadata
Release files for pyconvertapi-image-converter 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyconvertapi_image_converter-0.1.3.tar.gz | 5.4 kB | Without provenance | Details for pyconvertapi_image_converter-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyconvertapi_image_converter-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for pyconvertapi_image_converter-0.1.3-py3-none-any.whl |
Total release size: 11.5 kB
Release files / pyconvertapi_image_converter-0.1.3.tar.gz
| Download URL | pyconvertapi_image_converter-0.1.3.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ab83b91757fb4aa0ff0ac3e6c0bcbefcc5f9fa9c2503645d7f3624fb624e815
|
|
BLAKE2b-256 checksum How to use checksums |
5d24407dca7b817840ac391a153d7d63fa4e17f91b0a4c780c55fe120bf98fd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / pyconvertapi_image_converter-0.1.3-py3-none-any.whl
| Download URL | pyconvertapi_image_converter-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ded9485be178ea57242fbe8c560f4043a34e16338fdbf2dc19f7d885a0baaa6e
|
|
BLAKE2b-256 checksum How to use checksums |
fdc82b0dc7c243327c3b0e393037fed54a34498e5e0885ccd1644c39057ee925
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for pyconvertapi-image-converter 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.