Skip to main content

A Python package for extracting and processing text from images.

Project description

po_meta_magic

Overview

po_meta_magic is a Python package designed for extracting and processing text from images based on metadata and bounding box information. It includes functionalities for validating inputs, extracting text from specific regions of an image, formatting dates, and ensuring only allowed characters are included in the output.

Installation

To install the package, use pip:

pip install po-meta-magic

Parameters

  • image (PIL.Image.Image): The image object from which text will be extracted.

  • meta_data (dict): A dictionary where keys represent metadata types and values are dictionaries containing:

    • bbox: Bounding box coordinates as a tuple (x_min, y_min, x_max, y_max).
    • key: The key or text to find and extract.
    • date_format (optional, str): Format for dates if the value is a date.
    • optional_key_match (optional, bool): If True, key is not required to be present in the text.
    • allowed_chars (optional, str): Characters to be kept in the text (e.g., 0-9A-Za-z).

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

po_meta_magic-0.1.6.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

po_meta_magic-0.1.6-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file po_meta_magic-0.1.6.tar.gz.

File metadata

  • Download URL: po_meta_magic-0.1.6.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for po_meta_magic-0.1.6.tar.gz
Algorithm Hash digest
SHA256 ec86345194d79f65216770bc95197d7d1b3948e782f228e38f08ddcdf7dc6e89
MD5 213d0036e99d066f3175749cdd0424f9
BLAKE2b-256 6bc99be50d374d18d00c810bc89fd5ed698d0cfbb331ce8399dfc11214ef3e1a

See more details on using hashes here.

File details

Details for the file po_meta_magic-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: po_meta_magic-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for po_meta_magic-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ac388679d10f1980d3dad6d4d115a0258bd5cf6e1a5b5ccf14525015b834efbb
MD5 faf316ddf907fc08b1c83d6aba22235b
BLAKE2b-256 927caff566081665055e49828e7d69a6840a89d2b5ab154c2ab478fcd85ad758

See more details on using hashes here.

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