Skip to main content

Precision-focused media metadata inspection tool built in Go and distributed via Python

Project description

Media Metadata Surgery

Media Metadata Surgery is a precision‑focused, offline CLI tool for inspecting and modifying metadata in media files.

The core engine is written in Go for performance, safety, and correctness. A lightweight Python wrapper is used only for distribution, making the tool easy to install via pip while keeping the actual logic native and fast.

v0.1.1 is the beginning. The project is intentionally small, strict, and correct. More formats and operations will be added incrementally.


Why Media Metadata Surgery exists

Media files silently carry far more information than most users realize:

  • GPS location and timestamps
  • Device make, model, and camera internals
  • Processing pipelines, filters, and AI hints
  • Hidden user comments and sensor data

This project exists to:

  • Expose metadata clearly
  • Operate fully offline
  • Avoid heavy external dependencies
  • Favor correctness over convenience

No cloud. No telemetry. No shelling out to system tools.


Current status

Version: 0.1.1 (initial release)

This version intentionally supports only one format and one operation:

  • JPG / JPEG
  • EXIF metadata inspection (read‑only)

This narrow scope allows the foundation to remain clean and extensible.


Installation

Install via pip (recommended)

pip install surgery

This installs the surgery command globally. The Go binary is bundled inside the Python package.


Build from source (Go)

Requirements:

  • Go 1.20+
git clone https://github.com/ankit-chaubey/media-metadata-surgery
cd media-metadata-surgery
go build -o surgery ./cli

Run directly:

./surgery view image.jpg

Usage

View EXIF metadata from a JPG image

surgery view image.jpg

Example output:

EXIF Metadata:
Make: "vivo"
Model: "vivo T1 5G"
DateTimeOriginal: "2026:02:04 18:44:10"
GPSLatitude: ["18/1","20/1","4247/900"]
GPSLongitude: ["84/1","25/1","4824/190"]
UserComment: "filter: 104; ..."

Supported formats (v0.1.1)

Media type Format Operation
Image JPG / JPEG View EXIF metadata

More formats will be added only when they can be handled correctly.


Project structure

media-metadata-surgery/
├── cli/                # Go CLI entry point
├── core/               # Core metadata logic
│   └── jpg/            # JPG / EXIF handling
├── surgery/            # Python wrapper package
│   └── bin/surgery     # Go binary (bundled)
├── setup.py            # PyPI configuration
├── pyproject.toml
└── README.md

Design principles:

  • Go does all real work
  • Python only launches the binary
  • No CGO
  • No external system tools

Security & privacy notes

  • All operations are offline
  • No network access
  • No background processes
  • Viewing metadata does not modify files

Metadata removal, when added, will be explicit and opt‑in.


Roadmap

Planned, in order of correctness priority:

  • GPS metadata removal (JPG)
  • Structured JSON output
  • Audio metadata (MP3 / FLAC)
  • Video containers (MP4 / MKV)
  • Batch processing
  • Integrity and diff reporting

The project will grow conservatively.


License

Apache License 2.0


Developed by

Ankit Chaubey
GitHub: https://github.com/ankit-chaubey
Project repository: https://github.com/ankit-chaubey/media-metadata-surgery


Philosophy

Precision over features. Correctness over speed. Transparency over magic.

Media Metadata Surgery is built as a long‑term, trustworthy utility — not a shortcut tool.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

surgery-0.1.1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

surgery-0.1.1-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file surgery-0.1.1.tar.gz.

File metadata

  • Download URL: surgery-0.1.1.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for surgery-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d86b6c3d95013145c473cc51c260b8e906001e0b8971523d24eb364d5e0f25ed
MD5 5b1588981c39dc7f4e730074d5b0b8e7
BLAKE2b-256 ed1c9c83dfcb8b258c6b7d5097dd48bbd9e4233748abc78b4df89764f8d89327

See more details on using hashes here.

Provenance

The following attestation bundles were made for surgery-0.1.1.tar.gz:

Publisher: publish.yml on ankit-chaubey/media-metadata-surgery

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file surgery-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: surgery-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for surgery-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3930a1c3d170edc911b344b0c52268ccebd4a479b08c3f3b2dc3fffd3cb045b3
MD5 1f7775598d1b914a911234d48c58950b
BLAKE2b-256 4f745cf4bc12ac5866a2a8947f950a4f957b0e53ec2c5ea6f5c135e1090a0fff

See more details on using hashes here.

Provenance

The following attestation bundles were made for surgery-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ankit-chaubey/media-metadata-surgery

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page