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.7.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.7-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: po_meta_magic-0.1.7.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.7.tar.gz
Algorithm Hash digest
SHA256 a47d2f4b6c691fad65938d3d912a9782a76001a136dc45b7e44985e23cfc15f7
MD5 265c5c0a19626b7c82bba5a9fcb5596b
BLAKE2b-256 719d0017ae447912da5a233ae9fee574ad3886b6e74da49d6fcd8af2ca5fea21

See more details on using hashes here.

File details

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

File metadata

  • Download URL: po_meta_magic-0.1.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 90787573861ff82d5598ee9456fa3272fa63a762e6cc16fd208729471a24d6af
MD5 5ebb580d6f73d30770ddd51b58dc6179
BLAKE2b-256 eeb24f37a7a8aa024f85cf2a0c0d573507af15d50ae63fd27b55074d5848e134

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