Metadata-Version: 2.4
Name: groupdocs-metadata-net
Version: 26.9.0
Summary: GroupDocs.Metadata for Python via .NET - Read, write and remove metadata from documents and images
Author-email: GroupDocs <support@groupdocs.com>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://products.groupdocs.com/metadata/python-net/
Project-URL: Documentation, https://docs.groupdocs.com/metadata/python-net/
Keywords: metadata,exif,xmp,iptc,id3,document-properties,pdf,docx,image,groupdocs,dotnet
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: <3.15,>=3.5
Description-Content-Type: text/markdown

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

[![PyPI](https://img.shields.io/pypi/v/groupdocs-metadata-net)](https://pypi.org/project/groupdocs-metadata-net/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/groupdocs-metadata-net)](https://pypi.org/project/groupdocs-metadata-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/python-net/) | [Blog](https://blog.groupdocs.com/category/metadata/) | [Free Support](https://forum.groupdocs.com/c/metadata) | [Temporary License](https://purchase.groupdocs.com/temporary-license)

GroupDocs.Metadata for Python via .NET is a metadata management API that reads, edits, and removes metadata from documents, spreadsheets, presentations, PDFs, images, audio, and video — 115+ file formats. It works with the major metadata standards (XMP, EXIF, IPTC, Image Resource Blocks, ID3, document properties) through one unified, format-independent API.

## Get Started

```bash
pip install groupdocs-metadata-net
```

```python
from groupdocs.metadata import Metadata

with Metadata("document.docx") as metadata:
    root = metadata.get_root_package()
    print("Format:", root.file_type.file_format)
```

## How It Works

The package is a self-contained Python wheel (~185 MB) that bundles the embedded .NET runtime and everything needed to process metadata — just `pip install` and start reading metadata. On Linux the system also needs ICU and fontconfig, which most distributions already have (see *System Requirements* below). The wheel works across Python 3.5 – 3.14 on Windows, Linux, and macOS (Intel + Apple Silicon).

## Features

- **Read, edit, and remove** metadata from 115+ formats with one unified API.
- **Metadata standards**: XMP, EXIF, IPTC IIM, Image Resource Blocks, ID3 (ID3v1/ID3v2), Lyrics3, APE.
- **Search engine**: find, update, add, and remove properties with simple Python predicates and predefined tags.
- **One-call sanitize**: strip every detected property before sharing a file.
- **Document inspection**: detect format/MIME type, page count, encryption, digital signatures, comments, and hidden pages.
- **Export**: dump the metadata tree to CSV, XLSX, JSON, or XML.
- **Cross-Platform**: Windows x64, Linux x64, macOS x64/ARM64.

## Common Tasks

- Detect a file's real format and MIME type by its internal structure
- Read EXIF/XMP/IPTC properties from photos
- Read and edit ID3/APE/Lyrics tags in audio files
- Strip author, comments, and revision history from Office documents before publishing
- Find and remove properties that match a condition (by tag, name, type, or value)
- Export a document's full metadata tree to a spreadsheet for auditing
- Feed extracted metadata into a search, compliance, or DAM pipeline

## Supported File Formats

This API supports a broad set of document and media formats, including:

- **Word Processing**: DOC, DOCX, DOCM, ODT, DOT, DOTM
- **Spreadsheets**: XLS, XLSX, XLSM, ODS, XLSB, XLT
- **Presentations**: PPT, PPTX, PPS, PPSX, POT, POTM
- **PDF**: PDF
- **Images**: JPG, PNG, TIFF, BMP, GIF, PSD
- **Audio/Video**: MP3, WAV, OGG, AVI, MOV, MKV, ASF, FLV, MK3D
- **Email**: EML, MSG
- **eBook**: EPUB, MOBI, FB2
- **Archives**: ZIP, RAR, 7Z, TAR, CB7, CBR
- **Fonts**: OTF, TTF, TTC, OTC
- **CAD**: DWG, DXF
- **3D**: FBX, STL, 3DS, DAE, GLTF
- **Visio**: VSD, VSDX, VDX, VSS, VSX, VTX
- **OneNote**: ONE
- **GIS**: KML, GPX, GEOJSON, GML, OSM, SHP
- **Other formats**: MPP, MPT, TORRENT, VCF, VCR

Supports **115+ file formats**.

For a complete list, see [supported formats](https://docs.groupdocs.com/metadata/python-net/supported-document-formats/).

## Examples

### Read metadata

```python
from groupdocs.metadata import Metadata

with Metadata("input.docx") as metadata:
    for prop in metadata.find_properties(lambda p: True):
        print(f"{prop.name} = {prop.value}")
```

### Get document info

```python
from groupdocs.metadata import Metadata

with Metadata("input.xlsx") as metadata:
    info = metadata.get_document_info()
    print("Format:", info.file_type.file_format)
    print("MIME type:", info.file_type.mime_type)
    print("Pages:", info.page_count)
    print("Size:", info.size, "bytes")
    print("Encrypted:", info.is_encrypted)
```

### Find properties by tag

```python
from groupdocs.metadata import Metadata
from groupdocs.metadata.tagging import Tags

with Metadata("input.docx") as metadata:
    authors = metadata.find_properties(lambda p: Tags.person.creator in list(p.tags))
    for prop in authors:
        print(prop.name, "=", prop.value)
```

### Set / update properties and save

```python
from datetime import datetime
from groupdocs.metadata import Metadata
from groupdocs.metadata.common import PropertyValue
from groupdocs.metadata.tagging import Tags

with Metadata("input.docx") as metadata:
    affected = metadata.set_properties(
        lambda p: Tags.time.created in list(p.tags),
        PropertyValue(datetime.now()),
    )
    print("Updated:", affected)
    metadata.save("output.docx")
```

### Remove all metadata (sanitize)

```python
from groupdocs.metadata import Metadata

with Metadata("input.pdf") as metadata:
    removed = metadata.sanitize()
    print("Removed:", removed)
    metadata.save("clean.pdf")
```

### Export the metadata tree

```python
from groupdocs.metadata import Metadata
from groupdocs.metadata.export import ExportManager, ExportFormat

with Metadata("input.pdf") as metadata:
    properties = list(metadata.find_properties(lambda p: True))
    ExportManager(properties).export("metadata.xlsx", ExportFormat.XLSX)
```

### Load from a stream

```python
import io
from groupdocs.metadata import Metadata

with open("input.docx", "rb") as stream:
    with Metadata(stream) as metadata:
        print("Format:", metadata.file_format)

buf = io.BytesIO(downloaded_bytes)
with Metadata(buf) as metadata:
    print(metadata.get_document_info().file_type.file_format)
```

## Command Line

Installing the wheel also puts `groupdocs-metadata` on `PATH` (or run `python -m groupdocs.metadata`).

```bash
groupdocs-metadata info photo.jpg                     # format / MIME type / size / pages / encryption
groupdocs-metadata show report.docx                   # every property: name = value  [tags]
groupdocs-metadata show report.docx --tag person      # only people: author, editor, ...
groupdocs-metadata show photo.jpg --tag time --json   # JSON for scripts

groupdocs-metadata clean report.docx                  # writes report.clean.docx
groupdocs-metadata clean report.docx -o report.docx   # in place
groupdocs-metadata remove photo.jpg --tag person.creator -o photo-anon.jpg

groupdocs-metadata export report.pdf -o metadata.json # json, csv, xlsx, xls or xml, from the extension
groupdocs-metadata list-formats                       # every supported extension, family and description

groupdocs-metadata --license license.lic show protected.docx --password secret
```

`--tag` takes a category — `content`, `corporate`, `document`, `legal`, `origin`, `person`, `property_type`, `time`, `tool` — or one tag in it, e.g. `person.creator` or `time.modified`; `show` prints each property's tags in that form. Exit codes: `0` success, `2` user error (missing file, unknown tag or export format), `1` engine error.

## AI Agent & LLM Friendly

This package is designed for seamless integration with AI agents, LLMs, and automated code generation tools.

- **`AGENTS.md` in the package** — AI coding assistants (Claude Code, Cursor, GitHub Copilot) auto-discover the API surface, usage patterns, and troubleshooting tips from the installed package
- **MCP server** — connect your AI tool to GroupDocs documentation for on-demand API lookups:
  ```json
  { "mcpServers": { "groupdocs-docs": { "url": "https://docs.groupdocs.com/mcp" } } }
  ```
- **Machine-readable docs** — full documentation available as plain text for RAG and LLM context:
  - Single file: `https://docs.groupdocs.com/metadata/python-net/llms-full.txt`
  - Per page: append `.md` to any docs URL

## Evaluation Mode

The API works without a license in evaluation mode, with these limitations:
- Only the first few properties of each metadata package are read.
- **Saving files is disabled** — `save()` raises an "Evaluation only" exception.

To remove these limitations, apply a license or request a [temporary license](https://purchase.groupdocs.com/temporary-license):

```python
from groupdocs.metadata import License
License().set_license("path/to/license.lic")
```

Or set the environment variable (auto-applied at import):
```bash
export GROUPDOCS_LIC_PATH="path/to/license.lic"
```

## Troubleshooting

| Issue | Platform | Fix |
|---|---|---|
| `DllNotFoundException` naming `libSkiaSharp` or `libaspose.slides.drawing.capi…`, or `libfontconfig.so.1: cannot open shared object file` | Linux | Install fontconfig: `apt-get install libfontconfig1`. Without it, opening presentations and exporting to XLSX fail |
| `DllNotFoundException: libgdiplus` or `The type initializer for 'Gdip' threw an exception` | Linux/macOS | Not expected: since 26.9 no libgdiplus is needed. Install it (`apt-get install libgdiplus` / `brew install mono-libgdiplus`) and report the document to support |
| `DOTNET_SYSTEM_GLOBALIZATION_INVARIANT` errors, or the process aborts with `Couldn't find a valid ICU package` | Linux | Install ICU (`apt-get install libicu-dev`) and do NOT set this variable |
| `is not a supported wheel on this platform`, `No matching distribution found for groupdocs-metadata-net`, or pip installs a version older than 26.9 | Linux/macOS | The OS is older than the wheel needs (glibc 2.27, macOS 12), or pip is older than 20.3: `python -m pip install --upgrade pip`. Versions up to 26.7 were tagged for older systems, so an unpinned install falls back to them — and they fail at first use there. On an Intel Mac, a Python built against an old SDK reports macOS 10.16 — use pip 24.1+ or `SYSTEM_VERSION_COMPAT=0 pip install groupdocs-metadata-net` |
| `TypeError: … cannot wrap function as GroupDocs.Metadata.Options.CreatePageStream` | All | Page previews (`generate_preview` / `PreviewOptions`) are not available from Python yet |
| `DllNotFoundException: … aspose.slides.drawing.capi_vc14x64 …: The filename or extension is too long` opening a presentation | Windows | The package is installed so deep that its native library's path exceeds 260 characters. Install it (the virtual environment) closer to the drive root |
| `PermissionRuntimeError: Access to the path … is denied` (or `Read-only file system`) opening a file | All | `Metadata(path)` opens the file for writing, so a read-only file fails. Pass a stream instead: `with open(path, "rb") as f: Metadata(f)` |

## System Requirements

- Python 3.5 - 3.14, pip 20.3 or newer
- Windows x64, Linux x64, macOS x64/ARM64 — 64-bit Python only; there is no 32-bit Windows wheel
- Linux: glibc 2.27 or newer (e.g. Ubuntu 18.04+, Debian 10+, RHEL 8+), plus ICU and fontconfig (`apt-get install libicu-dev libfontconfig1`). No `libgdiplus`, and no Microsoft core fonts.
- macOS 12 or newer, Intel or Apple Silicon.

## More Resources

- [Documentation](https://docs.groupdocs.com/metadata/python-net/)
- [Code Examples](https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-Python-via-.NET)
- [Free Support Forum](https://forum.groupdocs.com/c/metadata)
- [Temporary License](https://purchase.groupdocs.com/temporary-license)

Also available for other platforms:
[.NET](https://products.groupdocs.com/metadata/net/) | [Java](https://products.groupdocs.com/metadata/java/) | [Node.js](https://products.groupdocs.com/metadata/nodejs-java/)

---

[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/python-net/) | [Blog](https://blog.groupdocs.com/category/metadata/) | [Free Support](https://forum.groupdocs.com/c/metadata) | [Temporary License](https://purchase.groupdocs.com/temporary-license)
