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

Uploaded Python 3

File details

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

File metadata

  • Download URL: po_meta_magic-0.1.5.tar.gz
  • Upload date:
  • Size: 3.6 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.5.tar.gz
Algorithm Hash digest
SHA256 6f6aab68ed43b5f0eb2e877953739963293907da7880262ec3efe072206274fb
MD5 c83ee7b5fe1c88baed67cec05f0e68b7
BLAKE2b-256 b609fb5037f540b90a7839054e5446fdf73e3eb1ebd9114d765b39f5f218a4b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: po_meta_magic-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 3.7 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c213a7225c3f8a0db615ecd960b485d84dab599a838325c54f381fe72a3a8dc3
MD5 3793ba26d34d6e8367a9e5edd12d488e
BLAKE2b-256 e1365937af2067a33e0f8a6c05426115df381fae5d2d431aabbc9333b0424dfd

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