Metadata-Version: 2.1
Name: groupdocs-metadata-net
Version: 25.10
Summary: GroupDocs.Metadata for Python via .NET is a robust document API that supports over 170 file types and enables developers to easily render files to various formats, such as PDF, HTML, JPG, or PNG. With this API, you can seamlessly render a wide range of file types, including popular OpenDocument and Microsoft Office formats like DOCS, XLSX, and PPTX, as well as specialized CAD and graphic editor files like DWG, DXF, PSD, AI, and CDR.
Home-page: https://products.groupdocs.com/metadata
Author: GroupDocs
License: Other/Proprietary License
Keywords: metadata,meta,file,render,api,pdf,docx,xlsx,pptx,html,png,word,excel,powerpoint,visio,opendocument,photoshop
Platform: win_amd64
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Unix
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: >=3.5,<3.14
Description-Content-Type: text/markdown

# File Metadata Python API

[![banner](https://raw.githubusercontent.com/Aspose/aspose.github.io/master/img/banners/aspose_slides-for-python-net-banner.png)](https://releases.groupdocs.com/metadata/python-net/)

[Product Page](https://products.groupdocs.com/metadata/python-net/) | [Docs](https://docs.groupdocs.com/metadata/python-net/) | [Demos](https://products.groupdocs.app/metadata/family) | [API Reference](https://reference.groupdocs.com/metadata/) | [Blog](https://blog.groupdocs.com/category/metadata/) | [Search](https://search.groupdocs.com/) | [Free Support](https://forum.groupdocs.com/c/metadata) | [Temporary License](https://purchase.groupdocs.com/temporary-license)

[GroupDocs.Metadata for Python via .NET](https://products.groupdocs.com/metadata/python-net/) is a powerful on-premise class library for read, edit, remove, retrieve, search, compare, replace and export metadata information of all popular documents & image file formats.

Without having to install any 3rd party component, you can use GroupDocs.Metadata to build different types applications. For example, GroupDocs, using its own APIs, developed a [free web application](https://products.groupdocs.app/metadata/pdf) that allows people to view their metadata PDF documents online.

## Metadata API Features

**GroupDocs.Metadata for Python via .NET** provides a single API to read, edit, search and clean metadata across many file types:

- [**View & extract metadata**](https://docs.groupdocs.com/metadata/python-net/extracting-metadata/) Read built-in and custom metadata properties (document, image, audio, video, archives) and inspect package/root-level data.
- [**Edit existing metadata**](https://docs.groupdocs.com/metadata/python-net/working-with-metadata-properties/) Update common fields (Author, Title, Company, dates) and write changes back to files.
- [**Add custom metadata properties**](https://docs.groupdocs.com/metadata/python-net/adding-metadata/) Insert custom tags and properties for classification, versioning, or app-specific workflows.
- [**Detect & remove sensitive metadata (clean metadata)**](https://docs.groupdocs.com/metadata/python-net/removing-metadata/)Locate and remove hidden or private information (comments, revisions, GPS/EXIF, personal tags) to protect privacy and comply with policies.
- [**Work with metadata standards: EXIF, IPTC, XMP**](https://docs.groupdocs.com/metadata/python-net/working-with-exif-metadata/) Read, update and add EXIF/IPTC/XMP tags used widely in images and media files (full tag access and custom tags supported).
- [**Robust load & save options**](https://docs.groupdocs.com/metadata/python-net/loading-files/)  
  Load from disk or streams, handle password-protected documents, and save modifications back to original source, a new file, or a stream.

## Supported File Formats

With **GroupDocs.Metadata for Python via .NET**, developers can view and manage metadata in a wide range of document, image, media, and archive formats:

- **Microsoft Word**: DOC, DOCX, DOCM, DOT, DOTX, DOTM, RTF, TXT  
- **Microsoft Excel**: XLS, XLSX, XLSM, XLSB, XLTM, XLT, XLTX, XLAM, SXC, SpreadsheetML  
- **Microsoft PowerPoint**: PPT, PPTX, PPTM, PPS, PPSX, PPSM, POT, POTX, POTM  
- **Microsoft Visio**: VSD, VSDX, VSDM, VDX, VDW, VSS, VSSX, VSSM, VSX, VST, VSTX, VSTM, VTX  
- **Microsoft Project**: MPP  
- **Microsoft Outlook**: MSG, EML, EMLX, PST, OST  
- **Microsoft OneNote**: ONE  
- **OpenDocument Formats**: ODT (text), ODS (spreadsheets)  
- **Portable Documents**: PDF  
- **Adobe Photoshop**: PSD  
- **AutoCAD Drawings**: DWG, DXF  
- **Images**: JPG, JPEG, JPE, JP2, PNG, GIF, TIFF, WebP, BMP, DJVU, DJV, DICOM, CR2  
- **Metafiles**: EMF, WMF  
- **Fonts**: OTF, OTC, TTF, TTC  
- **Audio**: MP3, WAV  
- **Video**: AVI, MOV, QT, FLV, MKV  
- **Matroska Media Containers**: MKV, MKA, MK3D, WEBM  
- **vCard Files**: VCF, VCR  
- **eBooks and Others**: EPUB, TORRENT, ASF  
- **3D Models**: 3DS, FBX, STL, DAE  
- **Archives**: ZIP, 7Z, RAR, TAR  

See [detailed list of file formats](https://docs.groupdocs.com/metadata/python-net/supported-document-formats/).

## Platform Independence

GroupDocs.Metadata for Python via .NET can be used to develop 32-bit and 64-bit applications for different operating systems (such as Windows, Linux and macOS) where Python 3.5 or later is installed. 

## Get Started

Ready to try GroupDocs.Metadata for Python via .NET?

Fetch the package and install **GroupDocs.Metadata**. Run this command: `pip install groupdocs.metadata`

If you already have **GroupDocs.Metadata** installed and want to get the latest version, 
you have to run `pip install --upgrade groupdocs.metadata` instead. 

Check out GroupDocs.Metadata for Python for .NET [documentation](http://docs.groupdocs.com/metadata/python-net/).  

**Or** 

Download Package from Official Website

To download the GroupDocs.Metadata package for your operating system, please visit the official [GroupDocs Releases website](https://releases.groupdocs.com/metadata/python-net/). Currently, four OS-specific packages are available:

- **Windows 64-bit:** Package name ends with `amd64.whl`
- **Windows 32-bit:** Package name ends with `win32.whl`
- **Linux 64-bit:** Package name ends with `linux1_x86_64.whl`
- **macOS Intel Silicon:** Package name ends with `macosx_10_14_x86_64.whl`

Choose the appropriate package based on your system's architecture.

## Quickly Fetching Metadata Properties

```py
import groupdocs.metadata as gm
import groupdocs.metadata.options as gvo

# Instantiate a Metadata object and load a JPEG file
with gm.Metadata("input.jpeg") as metadata:
    root = metadata.GetRootPackage()
    root.RemoveImageResourcePackage()
    metadata.Save("output.jpeg")
```

## Find metadata properties

Use tags to find most common metadata properties.

```py
# Fetch all the properties satisfying the predicate:
    # property contains the name of the last document editor OR the date/time the document was last modified
with gm.Metadata(constants.input_pptx) as metadata:
        specification = gm.search.ContainsTagSpecification(gm.tagging.Tags.person.editor).either(gm.search.ContainsTagSpecification(gm.tagging.Tags.time.modified))
        properties = metadata.find_properties(specification)
        for property in properties:
             print(f"Property name: {property.name}, Property value: {property.value}")

```

## Remove metadata properties

The easiest way to remove metadata properties from a file is to use corresponding tags that allow you to locate the desired properties across all metadata packages. But sometimes it’s necessary to remove metadata entries having a particular value. 

```py
const metadata = new groupdocs.metadata.Metadata("input.docx");

    # Remove all the properties satisfying the predicate:
    # property contains the name of the document author OR
    # it refers to the last editor OR
    # the property value is a string that is equal to the given string "John" (to remove any mentions of John from the detected metadata)
   with gm.Metadata(constants.input_docx) as metadata:
        specification = gm.search.ContainsTagSpecification(gm.tagging.Tags.person.creator).either(gm.search.ContainsTagSpecification(gm.tagging.Tags.person.editor)).either(gm.search.OfTypeSpecification(gm.common.MetadataPropertyType.STRING).both(gm.search.WithValueSpecification("John")))
        affected = metadata.remove_properties(specification)
        print(f"Properties removed: {affected}")
        metadata.save(constants.output_docx)
```

## Extracting metadata

The code sample below demonstrates some advanced usage of tags, categories and other attributes of metadata properties.

```py
def run():
    files = os.listdir(constants.input_path)
    for file in files:
        with gm.Metadata(constants.input_path+file) as metadata:
            if metadata.file_format != gm.common.FileFormat.UNKNOWN and metadata.get_document_info().is_encrypted != True:
                print()
                print(file)

                specification = gm.search.FallsIntoCategorySpecification(gm.tagging.Tags.content)
                properties = metadata.find_properties(specification)
                for property in properties:
                    print(f"Property name: {property.name}, Property value: {property.value}")

```

## Adding metadata

Adding metadata properties is the most sophisticated feature of the GroupDocs.Metadata search engine. When you call the addProperties method it examines all available metadata packages and tries to pick up a known property that would satisfy the specified predicate.

```py
def run():
    files = os.listdir(constants.input_path)
    for file in files:
        with gm.Metadata(constants.input_path+file) as metadata:
            if metadata.file_format != gm.common.FileFormat.UNKNOWN and metadata.get_document_info().is_encrypted != True:
                print()
                print(file)
        
        # Add a property containing the file last printing date if it's missing
                # Note that the property will be added to metadata packages that satisfy the following criteria:
                # 1) Only existing metadata packages will be affected. No new packages are added during this operation
                # 2) There should be a known metadata property in the package structure that fits the search condition but is actually missing in the package.
                # All properties supported by a certain package are usually defined in the specification of a particular metadata standard
        
                specification = gm.search.ContainsTagSpecification(gm.tagging.Tags.time.printed)
                now = datetime.now()
                property_value = gm.common.PropertyValue(now)
                affected = metadata.add_properties(specification, property_value)
                print(f"Affected properties: {affected}");
                filename, file_extension = os.path.splitext(file)
                metadata.save(constants.output_path + "output" + file_extension)
```

>GroupDocs.Metadata for Python requires you to use python programming language. For Node.js, Java and .NET languages, we recommend you get [GroupDocs.Metadata for Node.js](https://products.groupdocs.com/metadata/nodejs-java/), [GroupDocs.Metadata for Java](https://products.groupdocs.com/metadata/java/) and [GroupDocs.Metadata for .NET](https://products.groupdocs.com/metadata/net/), respectively.

[Product Page](https://products.groupdocs.com/metadata/python-net/) | [Docs](https://docs.groupdocs.com/metadata/python-net/) | [Demos](https://products.groupdocs.app/metadata/family) | [API Reference](https://reference.groupdocs.com/metadata/) | [Blog](https://blog.groupdocs.com/category/metadata/) | [Search](https://search.groupdocs.com/) | [Free Support](https://forum.groupdocs.com/c/metadata) | [Temporary License](https://purchase.groupdocs.com/temporary-license)

