Metadata-Version: 2.4
Name: nb-image-data-extractor
Version: 0.1.0
Summary: Extract metadata from images (library + optional upload API).
Author: Noopur
License: MIT
Project-URL: Homepage, https://github.com/Noopur17/image-data-extracter
Project-URL: Repository, https://github.com/Noopur17/image-data-extracter
Project-URL: Issues, https://github.com/Noopur17/image-data-extracter/issues
Project-URL: Documentation, https://github.com/Noopur17/image-data-extracter#readme
Keywords: image,metadata,exif,pillow,fastapi
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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 :: Multimedia :: Graphics
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Pillow>=10.0.0
Provides-Extra: api
Requires-Dist: fastapi>=0.110.0; extra == "api"
Requires-Dist: uvicorn>=0.27.0; extra == "api"
Requires-Dist: python-multipart>=0.0.9; extra == "api"
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == "dev"
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Dynamic: license-file

# image-data-extracter

Python library (and optional API) that extracts metadata from an image file.

## Features
- Basic metadata: format, dimensions, mode, color profile info, file size, hashes
- EXIF metadata (when present), including GPS and orientation
- CLI: print JSON metadata for a local file
- Optional FastAPI endpoint: upload an image and get metadata back

## Install (local)
```bash
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -U pip
python3 -m pip install -e ".[api]"
```

## Library usage
```python
from image_data_extractor import extract_metadata

metadata = extract_metadata("path/to/image.jpg")
print(metadata["image"]["width"], metadata["image"]["height"])
```

## CLI usage
```bash
python3 -m image_data_extractor path/to/image.jpg --pretty
```

## API usage (optional)
```bash
python3 -m pip install -e ".[api]"
uvicorn app.main:app --reload
```

Then POST a multipart upload:
```bash
curl -s \
  -F "file=@path/to/image.jpg" \
  "http://127.0.0.1:8000/metadata?pretty=1"
```

## Web UI (optional)
When the API is running, open:
- `http://127.0.0.1:8000/` (upload UI)
- `http://127.0.0.1:8000/docs` (Swagger)

## Development
```bash
python3 -m pip install -e ".[dev,api]"
pytest -q
```
