Skip to main content

A basic document parsing utility. (Parsers)

Project description

A basic document parsing and loading utility - Parsers

PyPI - Version PyPI - Implementation PyPI - Python Version PyPI - Status Static Badge Static Badge Static Badge Documentation Status PyPI - License PyPI - Wheel

Overview

The docp-* project suite is designed as a comprehensive (doc)ument (p)arsing library. Built in CPython, it consolidates the capabilities of various lower-level libraries, offering a unified solution for parsing binary document structures.

The suite is extended by several sister projects, each providing unique functionality:

Project Description
docp-core Centralized core objects, functionality and settings.
docp-parsers Parse binary documents (e.g. PDF, PPTX, etc.) into Python objects.
docp-loaders Load a parsed document's embeddings into a Chroma vector database, for RAG-enabled LLM use.
docp-docling Convert a PDF into Markdown format via wrappers to the docling libraries.
docp-dbi Interfaces to document databases such as ChromaDB, and Neo4j (coming soon).

The Toolset (Parsers)

As of this release, parsers for the following binary document types are supported:

  • PDF
  • MS PowerPoint (PPTX)
  • (more coming soon)

Quickstart

Installation

To install docp-parsers, first activate your target virtual environment, then use pip:

pip install docp-parsers

For older releases, visit PyPI or the GitHub Releases page.

Example Usage

For convenience, here are a couple examples for how to parse the supported document types.

Extract text from a PDF file:

    >>> from docp_parsers import PDFParser

    >>> pdf = PDFParser(path='/path/to/myfile.pdf')
    >>> pdf.extract_text()

    # Access the content of page 1.
    >>> pg1 = pdf.pages[1].content

Extract text from a PowerPoint presentation:

    >>> from docp_parsers import PPTXParser

    >>> pptx = PPTXParser(path='/path/to/myfile.pptx')
    >>> pptx.extract_text()

    # Access the text on slide 1.
    >>> pg1 = pptx.slides[1].content

Using the Library

The documentation suite provides detailed explanations and usage examples for each importable module. For in-depth documentation, code examples, and source links, refer to the Library API page.

A search field is available in the left navigation bar to help you quickly locate specific modules or methods.

Troubleshooting

No troubleshooting guidance is available at this time.

For questions not covered here, or to report bugs, issues, or suggestions, please open an issue on GitHub.

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

docp_parsers-1.0.0.tar.gz (10.6 MB view details)

Uploaded Source

Built Distribution

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

docp_parsers-1.0.0-py3-none-any.whl (38.7 kB view details)

Uploaded Python 3

File details

Details for the file docp_parsers-1.0.0.tar.gz.

File metadata

  • Download URL: docp_parsers-1.0.0.tar.gz
  • Upload date:
  • Size: 10.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for docp_parsers-1.0.0.tar.gz
Algorithm Hash digest
SHA256 89a98febef25619d555d64a6414feae8ad007ba555c0f3cba6cd7d17fe469b61
MD5 4ae0a89dc0e6496fd11df6d5d7437295
BLAKE2b-256 75b294f05d7d6d257648f71d7937df20067f7c5dc542dd11de7cabd154ffe98d

See more details on using hashes here.

File details

Details for the file docp_parsers-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: docp_parsers-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 38.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for docp_parsers-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff7169285aa6318843b31bf478abf452b2dd3e37e920142634ff437d8788ff9f
MD5 053dfc998abefadf64e66ecdd515d58f
BLAKE2b-256 f664caae3e951659e63270b49370579618e21fefa46d75ba5bfcc83781164cd4

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