Skip to main content

Pygifsicle

pip License downloads python versions GitHub actions

Python package wrapping the gifsicle library for editing and optimizing gifs.

How do I install this package?

As usual, just download it using pip:

pip install pygifsicle

While running the installation, on MacOS the setup will automatically install gifsicle using Brew.

On Linux you will need to install gifsicle using apt-get as follows:

sudo apt-get install gifsicle

On Windows you will need to download and install the correct port of the library for your OS.

Usage examples

The library is currently pretty plain: it offers a wrapper to gifsicle and a method to optimize gifs, wrapping the options for gifsicle.

Optimizing a gif

To optimize a gif, use the following:

from pygifsicle import optimize
optimize("path_to_my_gif.gif")

General wrapper

To run gifsicle from Python use the following:

from pygifsicle import gifsicle
gifsicle(
    sources=["list.gif", "of.gif", "gifs.gif"], # or a single_file.gif
    destination="destination.gif", # or just omit it and will use the first source provided.
    optimize=False, # Whether to add the optimize flag or not
    colors=256, # Number of colors to use
    options=["--verbose"] # Options to use.
)

Learn more about the general wrapper by reading the function documentation.

Troubleshooting

One of the most common issues you can get, especially on Windows, is that simply the gifsicle library is not available system-wide. Do try to run gifsicle in your terminal to check if the library is properly installed.

Help and support

Wanna add another wrapper for easier usage? Do a pull request!

Did you find an error or weird behavior? Open an issue!

Metadata

Release files for pygifsicle 1.1.0

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

Source distribution (sdist)

Source distribution for pygifsicle 1.1.0
File Size Uploaded Provenance
pygifsicle-1.1.0.tar.gz 5.4 kB Without provenance Details

Release files / pygifsicle-1.1.0.tar.gz

Download URL pygifsicle-1.1.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
dcef433520ace4c1136dfc7060e77042142a3dbd6bdb6a19bd9149ef5cbe7441
BLAKE2b-256 checksum
How to use checksums
d043e3d2b8922257902ce86fce33a860b2459de0d9257521cc1f1a0d9929ecc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.9

Security for pygifsicle 1.1.0

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.

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