Skip to main content

Used for working with documentations in Python.

Project description

PyDoc

A library for interacting with pdf documents.

Installation

pip install py-doc

Get Started

How to use the library:

from py_doc import Document 

# Instantiate a Document object 
image = Document('path/to/image.jpg')

# Use draw_classifications to find document classifications
image.draw_classifications("outupt.jpg")

# Additionally, if you just want the bounding boxes use get_bounding_box()
image.get_bboxes()

To do optical character recognition (OCR), you will need to install Tesseract on your machine and make sure it is added to your PATH. If you don't need OCR, you can skip this step.

from py_doc import Document
image = Document('path/to/image.jpg')

# Use get_text() to get all the text from the image
print(image.get_text())

# Use get_text_from_bbox() to get text from a specific bounding box
bbox = image.get_bboxes()[0]
print(image.get_text_from_bbox(bbox))

Documentation

The documentation for this library can be found here.

Examples

This image is a sample of the output of the draw_classifications() method. The bounding boxes are drawn around the document classifications. Sample Output

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

py-doc-0.1.1.tar.gz (11.4 MB view details)

Uploaded Source

Built Distribution

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

py_doc-0.1.1-py3-none-any.whl (11.4 MB view details)

Uploaded Python 3

File details

Details for the file py-doc-0.1.1.tar.gz.

File metadata

  • Download URL: py-doc-0.1.1.tar.gz
  • Upload date:
  • Size: 11.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for py-doc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 496b9ccb156e36328362bc41d5de0367b0e76fa00e55dc57b37113dfae0c20f1
MD5 341150c927028e2d686a6977eeca5edd
BLAKE2b-256 09342371927c02a2b9bcc25bdf913e93530968f49fb40b31d4656ce740f4968e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_doc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for py_doc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ed661d1a6630d1c3ef1bd18b028b98685a7c20b9cdd9e3ed43a56783fe32c2a
MD5 8b6a8d93e65ec8f2cf39812306d93af2
BLAKE2b-256 cdcdd117fad9558ebf588fa9a381954a526c4353d4b2ecb5689892e7c66c319f

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