Skip to main content

ImgTag

Simple XMP Image Tag & Metadata Editing Module

It is recomended to install using Conda to create a virtual python environment, as it makes it easy to install and manage different packages. Use the following commands to set up an environment:

conda env create -f environment.yml
conda activate imgtag

If you choose to install manually, you must install exempi for your OS.

For Debian:

sudo apt-get install -y exempi

For a Conda environment:

conda install -c conda-forge exempi

Once exempi is installed, install imgtag with:

python3 -m pip install -y imgtag

To use imgtag:

from imgtag import ImgTag

# Open image for tag editing
test = ImgTag(
           filename="test.jpg",   # The image file
           force_case="lower",    # Converts the case of all tags
                                  # Can be `None`, `"lower"`, `"upper"`
                                  # Default: None
           strip=True,            # Strips whitespace from the ends of all tags
                                  # Default: True
           no_duplicates=True,    # Removes all duplicate tags (case sensitive)
                                  # Default: True
           use_warnings=True      # Toggles warnings
                                  # Default: True
           memory_limit_ratio=0.8 # The maximum percent of free memory to use
                                  # Default: 0.8
       )

# Print existing tags
print("Current tags:")
for tag in test.get_tags():
    print("  Tag:", tag)

# Add tags
test.add_tags(["sleepy", "happy"])

# Remove tags
test.remove_tags(["cute"])

# Set tags, removing all existing tags
test.set_tags(["dog", "good boy"])

# Save changes and close file
test.close()

# Re-open for tag editing
test.open()

# Remove all tags
test.clear_tags()

# Delete the ImgTag object, automatically saving and closing the file
del(test)

Metadata

Release files for imgtag 1.1.6

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

Source distribution (sdist)

Source distribution for imgtag 1.1.6
File Size Uploaded Provenance Actions
imgtag-1.1.6.tar.gz 17.2 kB Without provenance Details for imgtag-1.1.6.tar.gz

Release files / imgtag-1.1.6.tar.gz

Download URL imgtag-1.1.6.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
af7635dbceac52c41dbd13fca0cc38f48630b9164d47789aaaa600a51e919d39
BLAKE2b-256 checksum
How to use checksums
2d240413a44b9698ecb2078c767591d74b9dae87f2b8ab0937b77a52978f48ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.7

Security for imgtag 1.1.6

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